Re: Clients disconnect but query still runs - Mailing list pgsql-general

From Craig Ringer
Subject Re: Clients disconnect but query still runs
Date
Msg-id 4A71878D.6070606@postnewspapers.com.au
Whole thread Raw
In response to Re: Clients disconnect but query still runs  (Csaba Nagy <nagy@ecircle-ag.com>)
Responses Re: Clients disconnect but query still runs
List pgsql-general
Csaba Nagy wrote:

> It happened to us when a client box went out of memory and started
> swapping up to the point it was unaccessible even for console login. The
> connections of that machine were still live but unusable, as the client
> box will never get out of that state until hard resetting... which we
> would promptly do

You know, you can prevent that on any sane operating system by setting
resource limits on any at-risk processes, limiting total available swap
to a reasonable amount, etc. On Linux you may want to turn off memory
overcommit or dramatically reduce how much swap you allocate.

A host with a runaway process hogging memory shouldn't be dying. It
should really be killing off the problem process, or the problem process
should be dying its self after failing to allocate requested memory. If
this isn't the case, YOU HAVE TOO MUCH SWAP.

After all, swap is useless if there's so much that using it brings the
system to a halt.

> I will probably have to check out now the network connection
> parameters in the postgres configuration, never had a look at them
> before... in any case >2 hours mentioned in an earlier post seems a bad
> default to me.

It's the OS's default. PostgreSQL just doesn't change it.

--
Craig Ringer


pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: org.postgresql.util.PSQLException: PANIC: could not write to log file 6
Next
From: Phoenix Kiula
Date:
Subject: Slony and local machine slave..(supernewbie question)