4 ms·
The most common cause here is something causing a situation where some queries hang or takes a long time to complete, while also locking access to something, wh
by kokey 7y ago
The most common cause here is something causing a situation where some queries hang or takes a long time to complete, while also locking access to something, while new queries keep coming in. This builds up quickly.
A good way to catch this would be to have something log the list of running queries every couple of seconds. Look at this log after the crash and you'll hopefully be able to identify which are the long running processes, and which are the regular queries that builds up.
To fix it would be a combination of making the queries that cause the locking to be less like that, also perhaps putting in a limit on how many queries can build up and also implement a way for the regular queries that build up to time out or fail quicker or more gracefully.
- HugThem 7y agoI fire the queries sequentially. So there is never more then one query running.