-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
很容易就报错 数据库被锁 #52
Comments
reproduce example please? |
I have the same situation, I am a beginner, I was locked after frequent update operations |
Sorry, I forgot to tell you, I have goroutine to query the database, I think it has something to do with this |
You're right.
Let me know if this helped |
Thank you very much, it has worked for me |
db?cache=shared&mode=rwc&_journal_mode=WAL |
Yes, but following is mandatory:
|
dsn: echo error: ./conf/rb.db?cache=shared&mode=rwc&_journal_mode=WAL&_pragma=journal_mode(WAL) |
How many parameters do I have?
how add param busy_timeout |
&_pragma=journal_mode(WAL)&_pragma=busy_timeout(5000) |
yes |
|
NOT WORKSdsn := "file:./ex.db?_pragma=busy_timeout(5000)&_pragma=journal_mode(WAL)"
db, _ := gorm.Open(sqlite.Open(dsn), &gorm.Config{}) WORKSdsn := "file:./ex.db"
db, _ := gorm.Open(sqlite.Open(dsn), &gorm.Config{})
sqlDB, _ := db.DB()
sqlDB.SetMaxOpenConns(1) ENVgo version go1.21.1 windows/amd64
github.com/glebarez/sqlite v1.9.0 |
what does this mean? can you please provide an example for 1 long story short: is this supported? |
sqlite database is locked (5) (SQLITE_BUSY)
The text was updated successfully, but these errors were encountered: