-
Notifications
You must be signed in to change notification settings - Fork 755
sqlite3 - database is locked error message #161
Comments
Actually it seems this may be the source of the error: mattn/go-sqlite3#50 Let me know if you have any other ideas. I can just move away from sqlite. |
Ah... according to mattn/go-sqlite3#39 opening the db like so may fix this: db, err := sql.Open("sqlite3", "file:locked.sqlite?cache=shared&mode=rwc") |
OK. Great issue! I will add this to troubleshooting. |
@unknwon, I think the gogs sqlite3 build should use the new connection string. |
|
One update on this - I tried yesterday to use the new connection string in gogs (modified here https://github.com/gogits/gogs/blob/master/models/models.go#L80), but it didn't seem to help resolve the problem unfortunately... Was testing with sqlite 3.8.6 on OSX. |
Yep |
Let me test on my Mac and SQLite3, are you pushing through HTTP or SSH? |
I was pushing through HTTP. |
Is that because you use |
Ah nope - HTTP push just works better with the security infrastructure I have in place. |
OK, I'll test later. |
This bug is confirmed. |
@compressed I change the way to update hook tasks, which now works fine in SQLite3. But, this is still a bug in ORM level. |
Could you please try latest? |
Is this still a problem? |
@lunny SQLite3 cannot do session and global x at same time for same table, different tables are OK. Based on my experiences. |
Please follow mattn/go-sqlite3#39 comments to resolve the problem. |
When running gogs with sqlite3, the method:
around line 901 in session.go is returning an error that the database is locked.
This method seems to initiate the
UpdateHookTask
method (line 232 in models/webhook.go for gogs), which subsequently fails and the task is not updated. The database is not locked after the command fails.Steps to replicate:
Trying with MySQL, I'm not able to replicate the problem.
The text was updated successfully, but these errors were encountered: