speckle-server
speckle-server copied to clipboard
Database connections stuck
After some time, some of the available database connections get stuck and they are never freed. This causes the preview service to stop functioning (a stopgap measure to revert to node14 was put in place) But its also causing performance degradation on the server too.
I encountered this a few times recently and put it down to user error with making funky commits. Both things may be true.
Which symptom have you noticed @jsdbroughton ?
This causes the preview service to stop functioning
Which symptom have you noticed @jsdbroughton ?
Specifically, the previews are generated for some commits and not others. I only notice as I am using the embedded viewer. Whether the viewer has a preview or not is not a huge issue, but it has been inconsistent.
fixed in #805
Lets try with rewriting the SQL query without WHERE IN
next steps to try:
- [ ] not use
WHERE IN
for sql query in get object and children - [ ] sdk-s are sending the requests with get these child objects for me, that are in this list. There is possibly a better solution with cursors or smthing
- [ ] properly close node pg query streams, in here, the added extra streams are probably not closed, when a connection is terminated https://github.com/specklesystems/speckle-server/blob/main/packages/server/modules/core/rest/diffDownload.js#L66