postgres: arbitrary stuck queries
We have an issue, where the sql client just does not respond. In other words, the promise does not resolve nor reject. The application has peaks with lots of concurrent requests. The issue though also happens when there is not much load. It just arbitrary does not respond. When i restart the application, everything works fine again.
The client configuration:
return postgres(options.connectionString, {
idle_timeout: 0,
connect_timeout: 30,
max: 50,
});
I have a feeling that it happens after the service ran for some time already.
I also had a feeling that it often occurs with sql.begin(...), but i have also seen it once at a single sql`SELECT * FROM x WHERE id = ${id}`
Not sure where to start looking at here, since we are currently not able to reproduce it. Does anyone have any ideas why this could happen? I would also be happy to contribute to the project if we are able to find the issue here.
UPDATE
Here is the chart of one occurrence of the postgres DB, the needle is placed when the incident happened.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 16 (1 by maintainers)
Would you think your descriptions matches the ones in https://github.com/porsager/postgres/pull/738 ? That change has been released in v3.4.4 today. Would be nice if you all could give that a try and report back.