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

Timeout doesn't work for SQLite connections #2146

Open
odoriath-neo opened this issue Sep 3, 2024 · 0 comments
Open

Timeout doesn't work for SQLite connections #2146

odoriath-neo opened this issue Sep 3, 2024 · 0 comments

Comments

@odoriath-neo
Copy link

Describe the bug
Timeout is supposed to be -1 for database connections (wait forever) but for SQLite it doesn't get set which means PRAGMA busy_timeout has to be called or else errors like this will happen intermittently:

Aug 26 16:00:45 001tzc01 ws_server[2255895]: terminate called after throwing an instance of 'drogon::orm::SqlError'
Aug 26 16:00:45 001tzc01 ws_server[2255895]:   what():  database is locked

To Reproduce
Steps to reproduce the behavior:

  • No reproduction needed. It's just a fact that SQLite connections don't have their timeout set to anything.

Expected behavior

  • A SQLite connection should have some leeway regarding timeouts

Additional context
I'm not certain if this is a bug or a request since SQLite connections are so different from "real" db connections, so maybe the SQLite timeout isn't quite the same thing as your usual db connection timeout. Either way I think this would be useful to add.

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