Kitura / Kitura/Swift-Kuery-PostgreSQL
Connection enters .runningQuery state and never exits it.
- Dominant language
- Swift
- Stars
- 62
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
Have adopted the library to do direct SQL queries. At first I used a single shared connection. It was fast, but after about 30 minutes of production running, I found it would enter a .runningQuery state and never exit, jamming the whole app.
Passing a timeout option did not help, though I suspect the timeout is for the PostgreSQL DB itself, not the library code.
I have since moved to creating a new connection on every request. This is much more costly, but it at least does work. However, I do see gradual memory rise over a day (from about 12MB to 48MB). It is usable, but not nice. I suspect this is the same problem: connections entering the .runningQuery state, and never exiting the state, meaning all the associated state is kept around.
I know I could use a pool to make things faster, but the bigger concern is just this jammed state for the connection. Has anyone else seen this? Unfortunately, it takes a while to show up, so it is rare-ish. Makes testing more difficult. Perhaps the connection itself should have some sort of timeout. It would at least error and then continue on properly.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.