.Net 5.0: upgrading from 5.0.2 -> 5.0.5 leads to '53300: sorry, too many clients already'
See original GitHub issueIssue:
- currently running .net 5.0, and after upgrading to Npgsql.EntityFrameworkCore.PostgreSQL 5.0.5, connection strings are not disposed of, leading to an exception: ‘53300: sorry, too many clients already’.
Workaround:
- Downgrading to Npgsql.EntityFrameworkCore.PostgreSQL 5.0.2
Tested: For 5.0.2 and 5.0.5, completed the following steps:
- ran
pg_stat_activity
query to see current db connections
SELECT *
FROM pg_stat_activity
order by "backend_start"
- run 10 queries using ef core
- re-run
pg_stat_activity
query to see connections
Test Result:
- 5.0.2 - 2 connection remains idle
- 5.0.5 - 10 connections remain idle
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
PostgresException 53300: sorry, too many clients already
Hi all, I initialize Hangfire.Postgres with the name of my connection string. The same database is used by EntityFramework with the same ...
Read more >Too Many Clients Already in C# and PostgreSQL
Too Many Clients Already " exception comes where a server is asked to create more connections than it is configured to maintain.
Read more >psql: FATAL: sorry, too many clients already
This seems to be client programming specific problem. You won't be able to fix this by e.g. raising "max_connections" parameter.
Read more >.NET 5.0 will reach End of Support on May 10, 2022 - . ...
NET 5.0 will reach end of support on May 08, 2022, this blog breaks down all the valuable information you need to know...
Read more >Upgrading several of my Applications and Libraries to .NET 5.0
NET 5.0 's release a couple of weeks ago, I went through all of my personal/company .NET Core 3.1 applications and upgraded them...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I mentioned downgrading to 5.0.4 on another issue but I was a bit inaccurate (sorry) - the next earlier version on NuGet is 5.0.2. Downgrading to that fixed the issue.
There’s at least one connection leak in 5.0.5