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
Since a while now, students at @upleveled have been running into an issue where refreshes of a page (and Fast Refresh) are causing further database connections, and the old connections are not going away. This leads to confusing errors like (also mentioned in #42):
Error: remaining connection slots are reserved for non-replication superuser connections
The teardown / cleanup section in the readme with the prexit example appears to be helpful, but process.exit is not actually called during the development workflow (multiple page refreshes and Fast Refresh hot reloads when a file is changed).
As far as I can tell, there are a couple of different solutions to this:
Set an idle_timeout that will cause the idle connections to be terminated fairly quickly (eg. after 2 seconds)
Would you be open to me creating a section in the readme addressing this problem with option 1 as a recommended solution for development workflows for these long-running apps? With maybe option 2 as an "alternative" solution?
Hi @porsager! 👋
Since a while now, students at @upleveled have been running into an issue where refreshes of a page (and Fast Refresh) are causing further database connections, and the old connections are not going away. This leads to confusing errors like (also mentioned in #42):
The teardown / cleanup section in the readme with the
prexitexample appears to be helpful, butprocess.exitis not actually called during the development workflow (multiple page refreshes and Fast Refresh hot reloads when a file is changed).As far as I can tell, there are a couple of different solutions to this:
idle_timeoutthat will cause the idle connections to be terminated fairly quickly (eg. after 2 seconds)Would you be open to me creating a section in the readme addressing this problem with option 1 as a recommended solution for development workflows for these long-running apps? With maybe option 2 as an "alternative" solution?