[pgpool-general: 93] "Connection Timed Out" on clients connecting to pgpool

Mario Splivalo mario.splivalo at megafon.hr
Thu Dec 15 23:14:13 JST 2011


Hi.

I've written about this issue earlier, but since I haven't been able to
solve it.

I have two postgres servers in master-slave replication, and have pgpool
(on the same box as the master server) which is splitting read-write
queries from read-only queries. I have load-balancing set up so that
slave server has weight 1, and master has weight 0. I still am getting
reads from the master server because of the SELECTs that are part of
data-modifying transactions.

Now, before I introduced pgpool the master server (than only server) was
capable of having 500 concurent connetions with load average around 5
(box has 16 CPU cores), and cpu idle time was around 60-80%.

Now that I introduced pgpool, the load remained pretty much the same,
but I'm getting this 'connection timed out' on the client side, when
trying to connect to pgpool

My initial setup had num_init_children set to 100, with max_pool size
set to 4. Since there is always one user connecting to the only database
on the box I had 400 (unused) connections on each backend, with only 100
pgpool processes capable of handling connections.

Since then I have lowered the max_pool and increased num_init_children
to 1200, but the 'connection timed out' rate has not declined.

Those 'connection times out' don't hapen often, once every 5-15 minutes,
but there weren't any when there was no pgpool in front of postgres.

Is there anything else I can tune here? I'm running postgres 9.1 with
latest pgpool on debian squeeze. Web servers are running django via
mod_wsgi and using psycopg2 to connect to postgres.

	Mario


More information about the pgpool-general mailing list