Skip to content
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

SQLite has a query timeout. Hopefully fixes most 'database locked' errors #1961

Merged
merged 2 commits into from
Jun 15, 2017

Conversation

bkcsoft
Copy link
Member

@bkcsoft bkcsoft commented Jun 13, 2017

This adds a wait timeout for when the database is locked. Hopefully this should fix the database table is locked errors.

@bkcsoft bkcsoft added the type/enhancement An improvement of existing functionality label Jun 13, 2017
@bkcsoft bkcsoft added this to the 1.2.0 milestone Jun 13, 2017
@ethantkoenig
Copy link
Member

Does this actually fix the problem? From what I can tell, this just means we'll get an error of the form "Busy timeout" instead of an error of the form "Table XYZ is locked"

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 13, 2017
@bkcsoft
Copy link
Member Author

bkcsoft commented Jun 14, 2017

@ethantkoenig With this PR, SQLite should in theory wait for timeout milliseconds trying to get a lock, which in theory means less table is locked-errors, not that they go away. If you want that error to go away, don't use SQLite :trollface:

@ethantkoenig
Copy link
Member

Oh I see, LGTM

@lunny
Copy link
Member

lunny commented Jun 15, 2017

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 15, 2017
@bkcsoft bkcsoft changed the title SQLite has a query timeout. Hopefully fixes 'database locked' errors SQLite has a query timeout. Hopefully fixes most 'database locked' errors Jun 15, 2017
@bkcsoft bkcsoft merged commit bf48c8e into master Jun 15, 2017
@bkcsoft bkcsoft deleted the bkcsoft-sqlite-timeout branch June 15, 2017 02:51
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants