Re: pgpool master or slave goes down java access error

From: Waldo Nell <pwnell(at)telkomsa(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: pgpool master or slave goes down java access error
Date: 2011-08-12 16:44:18
Message-ID: DD70E845-3460-475F-815D-E1C883B49459@telkomsa.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


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.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2011-08-12 16:47:24 Re: Streaming replication performance
Previous Message Merlin Moncure 2011-08-12 16:32:53 Re: Recommended optimisations slows down PostgreSQL 8.4