Search Postgresql Archives

Re: Clients disconnect but query still runs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert James wrote:
> Is there no way to have the OS interrupt the postgres process 
> when a TCP/IP disconnect happens? Or is the OS also in the 
> dark that the TCP/IP connection was dropped? I believe that 
> there is a way to monitor this using TCP/IP keep alives.
> Or perhaps Postgres could check once every minute? Either 
> way, in my experience, solving this would be a major boon to 
> high volume servers, at least in the usage patterns I've worked with.

The server machine has no way of knowing that the client died
unless the client closes the connection gracefully.

There are server configuration parameters "tcp_keepalives_idle",
"tcp_keepalives_interval" and "tcp_keepalives_count" which, when
used, will make the operating system check idle connections
regularly.
They are not supported on all operating systems (only on these
whose socket options include TCP_KEEPIDLE, TCP_KEEPINTVL and
TCP_KEEPCNT).

Maybe they can help you.

Yours,
Laurenz Albe

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux