[Pgpool-general] Connection dropping unexpectedly

Bruno Lustosa bruno.lists at gmail.com
Thu Aug 28 20:55:34 UTC 2008


Hello!

I'm using pgpool-II-2.1 (had 2.0.1 from around february, directly from
cvs), and I'm getting some strange errors. Apparently, pgpool is
dropping or terminating the connection without a reason.
I have 2 backends, replicate is true, and load balance is also true.
It works fine, but sometimes it drops the connection and I get an
error at the page. I'm using PHP to connect to pgpool.

Error I get in PHP is when it tries to run pg_escape_string(), which
expects a string as a parameter to add quotes. However, an object is
passed instead. A dump of the object gives me this:

O:8:"DB_Error":8:{s:20:"error_message_prefix";s:0:"";s:4:"mode";i:1;s:5:"level";i:1024;s:4:"code";i:-1;s:7:"message";s:23:"DB
Error: unknown error";s:8:"userinfo";s:178:"SELECT
NEXTVAL('log_id_seq') [nativecode=server closed the connection
unexpectedly
        This probably means the server terminated abnormally
        before or while processing the
request.]";s:9:"backtrac............................

This message is directly serialized() from php. It seems when it tries
to run that select, the connection is already severed, and it
generates that error. I don't know what runs just before that query,
as that would require to set debug mode, and it fills the hard disk
really really fast (I can get the debug if needed, though).
Using just a -n, I get this output:

2008-08-28 17:15:33 LOG:   pid 2337: pool_process_query: child
connection forced to terminate due to client_idle_limit(70) reached
2008-08-28 17:15:58 LOG:   pid 2274: pool_process_query: child
connection forced to terminate due to client_idle_limit(70) reached
2008-08-28 17:16:45 LOG:   pid 2401: pool_process_query: child
connection forced to terminate due to client_idle_limit(70) reached
2008-08-28 17:16:50 LOG:   pid 2400: pool_process_query: child
connection forced to terminate due to client_idle_limit(70) reached
2008-08-28 17:17:08 LOG:   pid 2301: ProcessFrontendResponse: failed
to read kind from frontend. frontend abnormally exited
2008-08-28 17:37:32 LOG:   pid 3445: pool_process_query: child
connection forced to terminate due to client_idle_limit(70) reached
2008-08-28 17:37:32 LOG:   pid 3451: pool_process_query: child
connection forced to terminate due to client_idle_limit(70) reached
2008-08-28 17:37:32 LOG:   pid 3429: pool_process_query: child
connection forced to terminate due to client_idle_limit(70) reached
2008-08-28 17:38:35 ERROR: pid 3400: pool_flush_it: write failed
(Connection reset by peer) offset: 0 wlen: 461
2008-08-28 17:39:01 LOG:   pid 3513: pool_process_query: child
connection forced to terminate due to client_idle_limit(70) reached

The 70 second idle limit is normal, I set it up on pgpool to avoid
processes hanging the connection forever. I had an issue with this in
the past. However, there are those errors (connection reset by peer),
and also the abnormal exit from the frontend.
What else should I need to send to get it analyzed properly? Running
pgpool with -d got me a half gig file about half an hour later. I'd
also find it hard to find anything inside a big file like this, but if
you can give me directions on where to find what's needed, I'll be
happy to help.

Thanks!

-- 
Bruno Lustosa <bruno at lustosa.net>
http://www.lustosa.net/


More information about the Pgpool-general mailing list