Thread: connection handling in 7.4.1

connection handling in 7.4.1

From
Scott Yeadon
Date:
Hi,

Postgres is part of the openSource repository DSpace which we are running h=
ere=20
at ANU. I upgraded from 7.4 to 7.4.1 on 17 January. Today (21/1) it appears=
=20
that either the number of connections has been reached (which is not possib=
le=20
on my local install) or the database itself has locked up. Postmaster was=
=20
restarted on 20/1 so the problemt has taken 2 days to surface. I have not h=
ad=20
a chance to look much deeper into the problem as I don't expect to get time=
=20
to investigate until next week.

The log output postgres returned is as follows:
  FATAL: the database system is shutting down

The application log is as follows:

Note that postgres is the only thing that has changed, no other software ha=
s=20
been updated. This did not occur under 7.4

A secondary issue is that postmaster will not shut down properly under 7.4.=
1,=20
I always have to use the "fast" shutdown mode. Has anything changed in the=
=20
connection handling, as if connections are not being released this could=20
easily cause the first problem? Again, this appears peculiar to 7.4.1.

Thanks.

Scott.

Re: connection handling in 7.4.1

From
Tom Lane
Date:
Scott Yeadon <scott.yeadon@anu.edu.au> writes:
> The log output postgres returned is as follows:
>   FATAL: the database system is shutting down

Sounds to me like something told the postmaster to shut down (sent it a
SIGTERM signal, in other words).  If you are certain you did not do this
manually, look around to see if there's any resource-limiting code in
effect that might try to kill the postmaster after it's used X amount of
cpu time or disk space or whatever.

> A secondary issue is that postmaster will not shut down properly under 7.4.1,
> I always have to use the "fast" shutdown mode.

You have a client that's not letting go of its connection.

            regards, tom lane