-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PGCat not using idle connections, instead spawns new ones. #720
Comments
Same issue on V1.1.1 BUT, if I run PGBench with -C (each new tx is a new connection) - PGCat just does... nothing |
Intercept user queries and give a fake reply.[plugins.intercept] |
Nah, it's not it. It's something to do with TCP connections I assum,e. |
I am looking at this. I am able to reproduce this on the latest version of PgCat. It seems to be somehow related to the min_pool setting because when I start with I'll dig more |
Well, that was easy (it is actually in the method name 😅 ) Line 480 in 2def40e
bb8 docs for
|
Reading through the PR that introduced this, it seems that Lev knew about this behavior So maybe this is a feature not a bug? The name of the setting is misleading though and I think it is a departure from what a similar setting in Pgbouncer does |
Running PGCat on a EC2 server on the same network as RDS.
I have min_pool_size set to 100.
PGCat is installed via Ubuntu's APT. Version: 1.1.2-dev4
WIth no other clients connected, when I check how many connections exist: PG shows 100 connections (that's correct)
Query:
SELECT client_addr, state, COUNT(1) FROM pg_stat_activity GROUP BY 1,2 ORDER BY 3 DESC;
But when I run pgbench with 20 connections with this command:
The server shows 120 connections. ~115-119 of which are idle during the benchmark
Why isn't it using the existing connections? They're idle. Nothing else is using the server.
///
Another bug I noticed, is that if I run
pgbench
with 200 connections - pgcat will open >500 connections that'll sit idle for the duration of the benchmarkone.sql is just
SELECT 1;
Config:
The text was updated successfully, but these errors were encountered: