kernel-memory icon indicating copy to clipboard operation
kernel-memory copied to clipboard

[Bug] Connection pool not released after Postgres query

Open xuzeyu91 opened this issue 1 year ago • 6 comments

Context / Scenario

await memoryDb.GetListAsync(KmsConstantcs.KmsIndex, filters: new List<MemoryFilter>() { new MemoryFilter().ByDocument(fileId) }, limit: int.MaxValue).ToListAsync().ConfigureAwait(false);

I often encounter anomalies such as sorry, too many clients are already ready when querying document slices. I have observed that each query adds a new link

SELECT count(*) FROM pg_stat_activity;

I have found that every query adds new links and they are not dispose. Frequent queries will cause my Postgres connection pool to fill up

What happened?

too many clients are already ready

Importance

I cannot use Kernel Memory

Platform, Language, Versions

I use kernel-memory to connect to Postgres

Relevant log output

too many clients are already ready

xuzeyu91 avatar Jun 26 '24 13:06 xuzeyu91