[Pgpool-general] question on pool_connection_pool_timer: set close time
Tatsuo Ishii
ishii at sraoss.co.jp
Fri Oct 3 01:48:52 UTC 2008
> I'm wondering where does this "pool_connection_pool_timer" gets its
> information from? I have checked the pool_connection_pool.c file and
> it made it seem like it looks for the "connection_life_time" setting
> but right now I have no timeouts on my pgpool.conf file so I was
> expecting that to go away but it hasn't.
connection_life_time is controled by SIGALRM. You could find this
around line 315 in pool_connection_pool.c:
/* no other timer found. set my timer */
pool_debug("pool_connection_pool_timer: set alarm after %d seconds", pool_config->connection_life_time);
pool_signal(SIGALRM, pool_backend_timer_handler);
alarm(pool_config->connection_life_time);
> When that sets the close time it will kill the pgpool child ?
No. (that is controled by "child_life_time")
> or
>
> close the connection from pgpool to the backends ?
Yes.
> or
>
> close the connection that pgpool has opened from the client (apache in
> this case) to pgpool ?
No. (that is controled by "child_idle_limit")
> In regards to "num_init_children" :
>
> The pgpool page says the following "Please note that cancelling a
> query creates another connection to the backend; thus, a query cannot
> be cancelled if the connections are full. If you want to ensure that
> queries can be cancelled, set this value to twice the expected
> connections."
>
> The problem with the above is that if I have num_init_children set to
> twice the number of max_connections that is set on postgresql then
> postgresql connection limit can get exceeded!
You really should not do that. I recommend num_init_children to be
lower than max_connections of PostgreSQL.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
> pgpool-II 2.1.1
> ............................................................
> num_init_children = 250
> max_pool = 1
> child_life_time = 300
> connection_life_time = 0
> child_max_connections = 0
> client_idle_limit = 0
> authentication_timeout = 0
> replication_mode = true
> load_balance_mode = true
> replication_stop_on_mismatch = true
> replicate_select = false
> reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'
> connection_cache = true
> ............................................................
>
>
> Thanks for any help
> -
> Marcelo
>
> _______________________________________________
> Pgpool-general mailing list
> Pgpool-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pgpool-general
More information about the Pgpool-general
mailing list