drogonframework / drogonframework/drogon
Timeout doesn't work for SQLite connections
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 14
Description
**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.
Contributor guide
Assessment
This issue has not been assessed yet.