[pgpool-general: 2250] Re: More I/O Error in Tomcat

Tatsuo Ishii ishii at postgresql.org
Thu Nov 7 13:34:40 JST 2013



> Great information. I would like to add this to our FAQ.
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp
>>   You might solve that by adding a time-out on the Tomcat side.
>>   http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
>>   What you should set is (AFAIK):
>>     minIdle (default is 10, set to 0)
>>     timeBetweenEvictionRunsMillis (default 5000)
>>     minEvictableIdleTimeMillis    (default 60000)
>>   This will try every 5 seconds and close any connections that were
>> not used in the last 60 seconds. If you keep the sum of both numbers
>> below the client time-out on the pgpool size connections should be
>> closed at Tomcat side before they time-out on the pgpool side.
>>   It is also beneficial to set the
>>     testOnBorrow (default false, set to true)
>>     validationQuery (default none, set to 'SELECT version();' no quotes)
>>   This will help with connections should they expire while waiting,
>> without supplying a disconnected connection to the application.
>> 2013/10/25 Josh Berkus <josh at agliodbs.com>:
>>> On 10/24/2013 05:22 PM, Tatsuo Ishii wrote:
>>>>>> This error happens between Tomcat and pgpool.  I suspect Tomcat
>>>>>> establishes persistent connections to pgpool and pgpool disconnects it
>>>>>> because client_idle_limit is not 0. Is this your case?
>>>>> Yes, that sounds likely.  If we need to disable client_idle_timeout,
>>>>> though, the number of DB connections bloats hopelessly; this is an
>>>>> application with many databases, so we end up with several idle pgPool
>>>>> connections per database.  Without client_idle_timeout, how would we
>>>>> handle this?
>>>> Why don't you turn off Tomcat side persistent connections?
>>> I can check on that as an option.  Might not be feasible.
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general

More information about the pgpool-general mailing list