[pgpool-general: 8962] Re: Java application occasionally gets "The connection attempt failed" errors

Ron ronljohnsonjr at gmail.com
Sat Nov 11 23:48:57 JST 2023


On 11/11/23 05:43, Tatsuo Ishii wrote:
>> PgPool 4.3.7 and PG 14.7
>>
>> By "occasionally", I mean 1 or 2 times for every 500 "batches" of data
>> we process.
>>
>> Attached is the error message text, the pgpool.conf file and
>> postgresql.conf file.
>>
>> "ps | aux | grep <db application user name>" shows maybe a dozen
>> connections to PgPool.
>>
>> We do not get these errors when connecting directly to the database on
>> node "a".
>>
>> It's a three node cluster (named "a", "b" and "c").  The VIP is
>> attached to node "c", and the PostgreSQL primary database is on node
>> "a".  PG streaming replica is node "b".
>>
>> Putting the VIP on node "a" does _not_ solve the problem (but it does
>> make things run slower).
>>
>> "num_init_children = 350" on all three nodes, and "max_connections =
>> 400" on the two DB servers.
>>
>> There's nothing in the error logs where PgPool "log_min_messages =
>> notice" and Postgresql log_min_error_statement and log_min_messages
>> are both = info, and client_min_messages = notice.
>>
>> Where else should we look?
> I am not familiar with JDBC driver but it looks like JDBC driver tried
> to connect to pgpool then failed. So if pgpool is related to the
> problem, I guess it may worth to check parameters of pgpool.conf that
> are related to connection establishment. I noticed that
> serialize_accept is enabled and reserved_connections = 3, both are
> different from the defaults. If you set back one of them or both to
> the default, do you see any difference?

I'll try changing reserved_connectionsto default.  However, the docs on 
serialize_accept say that it should be "off" when num_init_children is high, 
and my num_init_children is more than 300.  Thus, shouldn't it be set to 
"on"? (It'll be a week+, though, since the "application test guy" just went 
on vacation,
-- 
Born in Arizona, moved to Babylonia.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20231111/3b2a0610/attachment.htm>


More information about the pgpool-general mailing list