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
I initially used a single database connection to make all my (very small) queries. This will cause the database memory to slowly decrease until the database crashes.
I solved it by creating a new connection for each session in my server, but this seem to be a serious issue where the connection seem to cause the database to allocate memory which isn't returned until the connection is closed.
The text was updated successfully, but these errors were encountered:
Interesting observation. I've implemented a connection pool that would re-connect after a certain amount of use, but I thought that issue is some memory buildup on the Dart side, and not on the Postgresql side (never checked it though). Do you have a scenario where you can replicate this reliably? (e.g. running a Postgresql in docker and then doing the queries as a loop)
Is it due to statement reuse for queries being on by default? The statement is stored in the database server for each query string, per connection. You can disable reuse with a boolean flag to your execution method if you are generating dynamic queries often.
I initially used a single database connection to make all my (very small) queries. This will cause the database memory to slowly decrease until the database crashes.
I solved it by creating a new connection for each session in my server, but this seem to be a serious issue where the connection seem to cause the database to allocate memory which isn't returned until the connection is closed.
The text was updated successfully, but these errors were encountered: