[pgpool-general: 2220] Re: More I/O Error in Tomcat
ishii at postgresql.org
Fri Oct 25 19:48:46 JST 2013
Great information. I would like to add this to our FAQ.
SRA OSS, Inc. Japan
> You might solve that by adding a time-out on the Tomcat side.
> 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.
More information about the pgpool-general