<div dir="ltr"><div><div><div><div>Hello,<br><br></div>We have one postgres server and pgpool installed on the same server.<br></div>Postgres (9.2) : listen on 5432<br></div>Pgpool (3.3.3): listen on 5000<br><br><br></div>
<div>num_init_children = 32<br>max_pool = 4<br></div><div>Means that 32 connections will be opened to the postgres server and pgpool will handle 32*4 connections?<br><br></div><div>We have done some tests with pgbench : <br>
/usr/pgsql-9.2/bin/pgbench -h 10.0.0.2 -p 5000 -U postgres -c 100 -t 100;<br><br>Benchmarking options:<br>  -c NUM       number of concurrent database clients (default: 1) =&gt; 100   128-100=28 connections remaining<br>  -t NUM       number of transactions each client runs (default: 10) =&gt; 100</div>
<div><br></div><div>And if I do a &quot;show pool_pools;&quot;<br><br><br><font size="1"><span style="font-family:courier new,monospace"> pool_pid |     start_time      | pool_id | backend_id | database | username |     create_time     | majorversion | minorversion | pool_counter | pool_backendpid | pool_connected<br>
----------+---------------------+---------+------------+----------+----------+---------------------+--------------+--------------+--------------+-----------------+----------------<br> 11306    | 2014-05-19 14:29:27 | 0       | 0          | postgres | postgres | 2014-05-19 14:37:14 | 3            | 0            | 1            | 13865           | 1<br>
 11306    | 2014-05-19 14:29:27 | 1       | 0          |          |          |                     | 0            | 0            | 0            | 0               | 0<br> 11306    | 2014-05-19 14:29:27 | 2       | 0          |          |          |                     | 0            | 0            | 0            | 0               | 0<br>
 11306    | 2014-05-19 14:29:27 | 3       | 0          |          |          |                     | 0            | 0            | 0            | 0               | 0<br> 11307    | 2014-05-19 14:29:27 | 0       | 0          | postgres | postgres | 2014-05-19 14:37:14 | 3            | 0            | 1            | 13853           | 1<br>
 11307    | 2014-05-19 14:29:27 | 1       | 0          |          |          |                     | 0            | 0            | 0            | 0               | 0<br> 11307    | 2014-05-19 14:29:27 | 2       | 0          |          |          |                     | 0            | 0            | 0            | 0               | 0<br>
 11307    | 2014-05-19 14:29:27 | 3       | 0          |          |          |                     | 0            | 0            | 0            | 0               | 0</span></font><br>........<br><br></div><div><br></div><div>
There is only one connection cached by pool_id=0 (pool_connected=0 for pool_id 1,2,3). So we have the same number of connection on pgpool side and of on postgres side. It seems that connection pooling isn&#39;t working ?<br>
</div><div>During the test the pooler doesn&#39;t accept new connection (timeout).<br><br></div>Here are an extract of the settings in the config fle : <br><br><div>#------------------------------------------------------------------------------<br>
# POOLS<br>#------------------------------------------------------------------------------<br><br># - Pool size -<br><br>num_init_children = 32<br>max_pool = 4<br><br>child_life_time = 300<br>child_max_connections = 0<br>
connection_life_time = 0<br>client_idle_limit = 0<br><br>#------------------------------------------------------------------------------<br># CONNECTION POOLING<br>#------------------------------------------------------------------------------<br>
connection_cache = on<br>reset_query_list = &#39;ABORT; DISCARD ALL&#39;<br><br>#------------------------------------------------------------------------------<br># REPLICATION MODE<br>#------------------------------------------------------------------------------<br>
replication_mode = off<br><br>#------------------------------------------------------------------------------<br># LOAD BALANCING MODE<br>#------------------------------------------------------------------------------<br>
load_balance_mode = off<br><br>#------------------------------------------------------------------------------<br># MASTER/SLAVE MODE<br>#------------------------------------------------------------------------------<br>master_slave_mode = off<br>
<br>#------------------------------------------------------------------------------<br># PARALLEL MODE<br>#------------------------------------------------------------------------------<br>parallel_mode = off<br><br>#------------------------------------------------------------------------------<br>
# WATCHDOG<br>#------------------------------------------------------------------------------<br>use_watchdog = off<br><br>#------------------------------------------------------------------------------<br># ON MEMORY QUERY MEMORY CACHE<br>
#------------------------------------------------------------------------------<br>memory_cache_enabled = off<br><br><br></div><div>Any idea?<br></div><div>Thanks ;)<br></div></div>