-
I didn't do anything special. But I get this error after a few queries. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I use a genericrepository Each query opens a new session in postgresql.So I get this error after a while. |
Beta Was this translation helpful? Give feedback.
-
@ulaskalok Are you disposing the opened sessions? |
Beta Was this translation helpful? Give feedback.
-
@ulaskalok "after a few queries" is certainly not normal, unless otherwise odd PG setup or overall heavy traffic. As suggested above, see how you're managing your connections. If needed, take a mem dump and inspect If needed, make use of |
Beta Was this translation helpful? Give feedback.
@ulaskalok "after a few queries" is certainly not normal, unless otherwise odd PG setup or overall heavy traffic. As suggested above, see how you're managing your connections. If needed, take a mem dump and inspect
NpgsqlConnection
instances.If needed, make use of
pg_stat_activity
or ask your DBA to do so (https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW). From thereon, if needed, proceed to harness https://www.pgbouncer.org/ if you haven't and see it appropriate.