[Pgpool-general] pgbench hangs with pgpool II when count of connection is bigger than num_init_children

Yoshiyuki Asaba y-asaba at sraoss.co.jp
Wed Apr 16 11:28:49 UTC 2008


Hi,

From: "Pavel Stehule" <pavel.stehule at gmail.com>
Subject: [Pgpool-general] pgbench hangs with pgpool II when count of connection is bigger than num_init_children
Date: Wed, 16 Apr 2008 12:31:05 +0200

> I am testing pgpool II. I have small problem. If I understand to
> documentation well, then pg_pool can create num_init_children *
> max_pool connection. For default connection this is  128 connection.
> 
> But when I check pgbench with 33 connection, then pgbench hangs

It seems that you set num_init_children to 32. num_init_children is
the number of concurrent clients.

  client-1  <--> pgpool-1
  client-2  <--> pgpool-2
  ...
  client-32 <--> pgpool-32

client-33 waits until another client disconnects.

ex)
pgpool.conf:
  num_init_children = 1
  max_pool = 1

  % pgpool -n

psql:
  # client-1
  % psql -p 9999 pool
  Welcome to psql 8.3.0, the PostgreSQL interactive terminal.

  Type:  \copyright for distribution terms
         \h for help with SQL commands
         \? for help with psql commands
         \g or terminate with semicolon to execute query
         \q to quit

  pool=# 

  # client-2
  % psql -p 9999 pool
  wait...


max_pool is the number of connection cache slots in each
worker. Connection slots are mapped by user name and database name.

           | <---> PostgreSQL (user: x, database: y)
  pgpool-1 | <---> PostgreSQL (user: x, database: z)
           | <---> PostgreSQL (user: y, database: z)
           | <---> PostgreSQL (user: y, database: y)
  ...
           | <---> PostgreSQL (user: x, database: y)
  pgpool-32| <---> PostgreSQL (user: x, database: z)
           | <---> PostgreSQL (user: y, database: z)
           | <---> PostgreSQL (user: y, database: y)

If slot is full, pgpool discards the oldest cache and creates a new
connection cache.

Regards,
--
Yoshiyuki Asaba
y-asaba at sraoss.co.jp


More information about the Pgpool-general mailing list