if database connect failed, during subsequent visits, the following situations will definitely occur:
panic: runtime error: invalid memory address or nil pointer dereference
goroutine 98 [running]:
runtime/debug.Stack()
/Users/admin/software/dev/go/src/runtime/debug/stack.go:26 +0x64
github.com/gofiber/fiber/v3/middleware/recover.defaultStackTraceHandler({0x1021bf820, 0x14000294a88}, {0x101f79d80, 0x102bc5d00})
/Users/admin/data/go/pkg/mod/github.com/gofiber/fiber/v3@v3.0.0-beta.4/middleware/recover/recover.go:12 +0x30
github.com/gofiber/fiber/v3/middleware/recover.New.func1.1()
/Users/admin/data/go/pkg/mod/github.com/gofiber/fiber/v3@v3.0.0-beta.4/middleware/recover/recover.go:31 +0x98
panic({0x101f79d80?, 0x102bc5d00?})
/Users/admin/software/dev/go/src/runtime/panic.go:792 +0xf0
gorm.io/gorm.(*DB).getInstance(0x140002aae70)
/Users/admin/data/go/pkg/mod/gorm.io/gorm@v1.30.0/gorm.go:433 +0x1f8
file: gorm.go 202-204:
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question
template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨
Comment From: jinzhu
Yes, you should reinitialize the database before using it.