Thread: PostgreSQL unexpectedlly closes the connection

PostgreSQL unexpectedlly closes the connection

From
João Miguel Ferreira
Date:
Hello all,
 
I'm developing a program (daemon) in Perl. This program colects system information and stores in Pg via perl-DBI and perl-DBD-Pg.
 
The performance is totally great... but once in a while I the server closes the connection when I try to do an Insert/Update/Delete...
 
The Perl-DBI error is +/- something like this "... server closed the connection unexpectedlly..."...
 
Strange enough the same query is executed thousands of times per hour an only ocasionally I get this error... my program detects the error and reconnects... but I'dd really like to get to the bottom of this...
 
I've already run my daemon with trace activated but I still can't get any additional info as to the reason of the problem...
 
What reasons make Pg close the connection ?
How do I begin debbuging this... ?
 
Thanks
 
jmf
 
 

Re: PostgreSQL unexpectedlly closes the connection

From
"Shoaib Mir"
Date:
Can you please show us your db server logs when this event occurs on your client

Thanks,
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 8/28/06, João Miguel Ferreira <jmf@estg.ipvc.pt> wrote:
Hello all,
 
I'm developing a program (daemon) in Perl. This program colects system information and stores in Pg via perl-DBI and perl-DBD-Pg.
 
The performance is totally great... but once in a while I the server closes the connection when I try to do an Insert/Update/Delete...
 
The Perl-DBI error is +/- something like this "... server closed the connection unexpectedlly..."...
 
Strange enough the same query is executed thousands of times per hour an only ocasionally I get this error... my program detects the error and reconnects... but I'dd really like to get to the bottom of this...
 
I've already run my daemon with trace activated but I still can't get any additional info as to the reason of the problem...
 
What reasons make Pg close the connection ?
How do I begin debbuging this... ?
 
Thanks
 
jmf
 
 




Re: PostgreSQL unexpectedlly closes the connection

From
Michael Fuhr
Date:
On Sun, Aug 27, 2006 at 08:23:37PM +0100, Joo Miguel Ferreira wrote:
> I'm developing a program (daemon) in Perl. This program colects
> system information and stores in Pg via perl-DBI and perl-DBD-Pg.
>
> The performance is totally great... but once in a while I the server
> closes the connection when I try to do an Insert/Update/Delete...
>
> The Perl-DBI error is +/- something like this "... server closed the
> connection unexpectedlly..."...

Have you looked in the PostgreSQL server logs?  The cause might
appear there, especially if the server is crashing.

What version of PostgreSQL are you running and on what platform?
Have you added any third-party modules?

--
Michael Fuhr

Re: PostgreSQL unexpectedlly closes the connection

From
Julian Hagenauer
Date:
Hi,
i am running postgress 7.4.7 server on a Debian Sarge system.
The postgres-logs surprisingly shows nothing special. No error or something.

Thanks,
Julian

Re: PostgreSQL unexpectedlly closes the connection

From
Julian Hagenauer
Date:
On Mon, 28 Aug 2006 07:09:47 +0200
Julian Hagenauer <chaosbringer@gmx.de> wrote:

> i am running postgress 7.4.7 server on a Debian Sarge system.
> The postgres-logs surprisingly shows nothing special. No error or something.

Oops, sorry, replied to the wrong thread.

Sorry,
Julian