[pgpool-general: 6360] Re: Using client_idle_limit

Bo Peng pengbo at sraoss.co.jp
Sat Dec 22 19:20:49 JST 2018


Hi,

On Wed, 19 Dec 2018 18:56:56 +0900
홍정훈<wjxnsl at naver.com> wrote:

> Hi
>  
> I am testing Streaming replication with pgpool but I have problem.
>  
> I am useing client_idle_limit in pgpool.conf.
>  
> Suppose I set client_idle_limit to 60.
>  
> And after sending Query1, if I do not send Query2 for 60 seconds, the connection will be disconnected.
>  
> Sixty seconds after the connection is disconnected, if I send Query 2, pgpool makes a new connection, and instead of getting a response, it send out an error.
>  
> Like this.
>  
> test=> SELECT * FROM pg_stat_activity ORDER BY query_start ASC;
>  datid | datname |  pid  | usesysid | usename | application_name |  client_addr  | client_hostname | client_port |
>       backend_start         |          xact_start          |         query_start          |         state_change
>      | waiting | state  | backend_xid | backend_xmin |                          query
> -------+---------+-------+----------+---------+------------------+---------------+-----------------+-------------+---
> ----------------------------+------------------------------+------------------------------+--------------------------
> -----+---------+--------+-------------+--------------+----------------------------------------------------------
>  16384 | test  | 55934 |    16385 | test  | psql             | 11.22.412.534 |                 |       55053 | 20
> 18-12-19 18:27:03.215835+09 | 2018-12-19 18:27:07.53777+09 | 2018-12-19 18:27:07.53777+09 | 2018-12-19 18:27:07.53779
> 2+09 | f       | active |             |      1473227 | SELECT * FROM pg_stat_activity ORDER BY query_start ASC;
> (1 row)
>  
> test=> SELECT * FROM pg_stat_activity ORDER BY query_start ASC;
> ERROR:  unable to read data
> DETAIL:  child connection forced to terminate due to client_idle_limit:60 is reached
> server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
> The connection to the server was lost. Attempting reset: Succeeded.
>  
> Instead of getting an error when the connection is disconnected, I want to get a response by connecting a new connection.

It is a normal behavior.
Because the connection is disconnected, the query was not executed.
You need to execute the query once more to get response.

It is similar to PostgreSQL's "idle_in_transaction_session_timeout" parameter.


> I need your help on this part.
> 


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan



More information about the pgpool-general mailing list