Re: Clients disconnect but query still runs
От | Albe Laurenz |
---|---|
Тема | Re: Clients disconnect but query still runs |
Дата | |
Msg-id | D960CB61B694CF459DCFB4B0128514C203937E7D@exadv11.host.magwien.gv.at обсуждение исходный текст |
Ответ на | Re: Clients disconnect but query still runs (Robert James <srobertjames@gmail.com>) |
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: