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

Add knob to tweak _busy_timeout #328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gabriel-samfira
Copy link
Member

@gabriel-samfira gabriel-samfira commented Jan 28, 2025

In SQLite3 we may need to set a busy_timeout in the case of instances with high load. This change adds a knob that allows users to set a timeout if a database is locked for writing by another routine.

for details about the SQLIte3 option, see: https://www.sqlite.org/c3ref/busy_timeout.html

@gabriel-samfira
Copy link
Member Author

gabriel-samfira commented Jan 28, 2025

CC @maigl

A busy_timeout_seconds = 5 should help a lot. It is not necessary that sqlite will sleep for 5 seconds any time it hits a locked database, but for this amount of seconds, it won't return a failure and will retry to grab the lock multiple times.

In SQLite3 we may need to set a busy_timeout in the case of instances
with high load. This change adds a knob that allows users to set a
timeout if a database is locked for writing by another routine.

Signed-off-by: Gabriel Adrian Samfira <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant