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

Enable pragma busy_timeout in sqlite #348

Open
jlewi opened this issue Nov 24, 2024 · 0 comments
Open

Enable pragma busy_timeout in sqlite #348

jlewi opened this issue Nov 24, 2024 · 0 comments

Comments

@jlewi
Copy link
Owner

jlewi commented Nov 24, 2024

See
https://www.sqlite.org/pragma.html#pragma_busy_timeout

By default sqlite doesn't retry DB operations if the sqlite DB is busy.

In #347 we started observing sqlite busy errors. We should consider enabling pragma busy_timeout. I didn't enable it in #347 because I want see how bad contention is before enabling retries. #347 is fixing a bunch of bugs that I think are contributing to spurious SQLIte busy errors.

jlewi added a commit that referenced this issue Nov 25, 2024
Fix sqlite busy errors with session based learning

There were a couple different errors
* We were still enqueing block ids and not sessions in some places
* When we call Enqueue we should filter out sessions that aren't
suitable for learning; this should minimize DB contention
* Improve logging

By default sqlite doesn't have any retries for SQLITE_BUSY errors. We
could configure a timeout for retries using a PRAGMA; we should probably
do that but I want to hold off to see if this PR fixes the contention.
  * Filed #348 to follow up on this

Use ko to create docker images as part of the development process
* This is convenient when we want to build a docker image from our
latest changes without doing a relase.
* Change the Dockerfile to not include any arguments so that it is
compatible with the image ko builds
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

No branches or pull requests

1 participant