From: Marko Kreen Date: Thu, 3 Sep 2015 14:17:41 +0000 (+0300) Subject: Set query_wait_timeout to 120s by default. X-Git-Tag: pgbouncer_1_7_rc1~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37beeda95adcd5274c20f527bdfc66c519c0e704;p=pgbouncer Set query_wait_timeout to 120s by default. Current default (0) causes infinite queuing, which is not useful. Fixes: #46, #48 --- diff --git a/etc/pgbouncer.ini b/etc/pgbouncer.ini index 8b43030..fca7592 100644 --- a/etc/pgbouncer.ini +++ b/etc/pgbouncer.ini @@ -195,8 +195,8 @@ default_pool_size = 20 ;; Dangerous. Client connection is closed if the query is not assigned ;; to a server in this time. Should be used to limit the number of queued -;; queries in case of a database or network failure. (default: 0) -;query_wait_timeout = 0 +;; queries in case of a database or network failure. (default: 120) +;query_wait_timeout = 120 ;; Dangerous. Client connection is closed if no activity in this time. ;; Should be used to survive network problems. (default: 0) diff --git a/src/main.c b/src/main.c index 0a283ba..b053a9a 100644 --- a/src/main.c +++ b/src/main.c @@ -233,7 +233,7 @@ CF_ABS("server_reset_query_always", CF_INT, cf_server_reset_query_always, 0, "0" CF_ABS("server_check_query", CF_STR, cf_server_check_query, 0, "select 1"), CF_ABS("server_check_delay", CF_TIME_USEC, cf_server_check_delay, 0, "30"), CF_ABS("query_timeout", CF_TIME_USEC, cf_query_timeout, 0, "0"), -CF_ABS("query_wait_timeout", CF_TIME_USEC, cf_query_wait_timeout, 0, "0"), +CF_ABS("query_wait_timeout", CF_TIME_USEC, cf_query_wait_timeout, 0, "120"), CF_ABS("client_idle_timeout", CF_TIME_USEC, cf_client_idle_timeout, 0, "0"), CF_ABS("client_login_timeout", CF_TIME_USEC, cf_client_login_timeout, 0, "60"), CF_ABS("idle_transaction_timeout", CF_TIME_USEC, cf_idle_transaction_timeout, 0, "0"),