Re: pgpool master or slave goes down java access error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2011-08-12, at 03:58 , jenopob wrote:

> 
> 	I do some db falt tests 
> 	1)the test code run always connect pgpool,
> 	2)test master or slave go down 
> 
> 	but when mster or slave go down ,java code throws exception :
> 	
> 	org.postgresql.util.PSQLException: An I/O error occurred while sending to
> the backend
> 	org.postgresql.util.PSQLException: The connection attempt failed.
> 	
> 	the error happened once for little time,then goes normal.
> 
> what should I do to solve this problem?and show the reason about the matter.

I do not know much about pgpool but it sounds to me like the TCP connection is broken, and threads die and new threads make new connections they start working again.  If I understand you correctly, you need to write code that detects this IOException and then retries the connection attempt and re-execute the query.
-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux