Re: PGError: server closed the connection unexpectedly - Mailing list pgsql-general

From Doug McNaught
Subject Re: PGError: server closed the connection unexpectedly
Date
Msg-id 87hd8f8xg9.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to Re: PGError: server closed the connection unexpectedly  (Dave Steinberg <dave-pgsql@redterror.net>)
Responses Re: PGError: server closed the connection unexpectedly  (Dave Steinberg <dave-pgsql@redterror.net>)
List pgsql-general
Dave Steinberg <dave@redterror.net> writes:

>>>My biggest problem is the lack of any real error message on the server.
>>>    I don't see anything wrong in the system logs, and there's no core
>>> file in the /var/postgresql directory.
>> Are you sure core files are enabled; i.e. the server is running with
>> 'ulimit -c unlimited' ?
>
> Yes:
>
> $ whoami
> _postgresql
> $ ulimit -c
> unlimited

But does the startup script for PG set the limits as well?  It's quite
possible that the PG daemon startup sequence and logging in as the PG user go
through different scripts.

Also, make sure that you're looking in the right place for core
dumps--OpenBSD may put them somewhere weird by default.

[...]

> That looks to me like a clean and normal exit.  This is pointing more
> and more towards the client in the ruby case, isn't it?

Yeah, if the server were crashing its exit code would be greater than
127.

Also, usually when a backend crashes, the postmaster takes the whole
server down on the assumption that shared memory may have been
corrupted.  It doesn't sound like this is happening to you, which
again points to a client problem.

You're not using the same PG connection from two different threads, or
fork()ing and trying to use the same connection in the parent and the
child, or anything like that?

-Doug

pgsql-general by date:

Previous
From: Marcos José Setim
Date:
Subject: Performance Low Using the Prepare and Execute
Next
From: Andreas Kretschmer
Date:
Subject: Re: COPY to