You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, we love this package and the opportunities that it opens up for us. Great job :).
We have an app that started having database connection problems after adding socket.io. After doing some digging it appears that the issue is that the postgres adapter holds a connection for each namespace. That would be fine for many apps but our design is based on custom namespaces. It appears that every namespace that is accessed by some user will then hold a connection indefinitely. Is that the expected behavior? Are there any patterns that could free up these connections when the last user disconnects from the namespace?
Activity
darrachequesne commentedon Dec 8, 2021
Yes, that's indeed the current behavior, but I think we could change it.
As a temporary workaround, you can close the connection when the last user disconnects:
dave-apex commentedon Dec 8, 2021
Thanks makes a lot of sense. In the meantime, we have moved from Namespaces to Rooms and that is working fine for us.
feat: use a single Postgres connection for all namespaces
darrachequesne commentedon Apr 28, 2022
This should be fixed in version 0.3.0, implemented in 651e281.