Re: PGError: server closed the connection unexpectedly

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Dave Steinberg <dave(at)redterror(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PGError: server closed the connection unexpectedly
Date: 2006-01-07 22:50:14
Message-ID: 87hd8f8xg9.fsf@asmodeus.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dave Steinberg <dave(at)redterror(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2006-01-07 23:34:25 Re: E-mail harvesting on PG lists?
Previous Message Angshu Kar 2006-01-07 22:27:19 programming in pgsql