pg.ddx.io pgsql-jdbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
jdbc tcpKeepAlive parameter 2+ messages / 2 participants [nested] [flat]
* jdbc tcpKeepAlive parameter @ 2011-10-18 23:42 John R Pierce <pierce@hogranch.com> 2011-10-19 00:12 ` Re: jdbc tcpKeepAlive parameter Oliver Jowett <oliver@opencloud.com> 0 siblings, 1 reply; 2+ messages in thread From: John R Pierce @ 2011-10-18 23:42 UTC (permalink / raw) To: pgsql-jdbc the documentation is a little skimpy on the operation of tcpKeepAlive... we've got a scenario where the java client applications sometimes abort without cleaning up, and leave a postgres server process just sitting there. I'm assuming tcpKeepAlive=true would cause these processes to timeout eventually and clean themselves up? Is this a 2-way keepalive, in that if the server process dies, the client connection would timeout, too? on libpq, there's some options for the keepalive interval and count, but I don't see any such in JDBC? -- john r pierce N 37, W 122 santa cruz ca mid-left coast ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: jdbc tcpKeepAlive parameter 2011-10-18 23:42 jdbc tcpKeepAlive parameter John R Pierce <pierce@hogranch.com> @ 2011-10-19 00:12 ` Oliver Jowett <oliver@opencloud.com> 0 siblings, 0 replies; 2+ messages in thread From: Oliver Jowett @ 2011-10-19 00:12 UTC (permalink / raw) To: John R Pierce <pierce@hogranch.com>; +Cc: pgsql-jdbc On 19 October 2011 12:42, John R Pierce <pierce@hogranch.com> wrote: > the documentation is a little skimpy on the operation of tcpKeepAlive... > > we've got a scenario where the java client applications sometimes abort > without cleaning up, and leave a postgres server process just sitting there. > I'm assuming tcpKeepAlive=true would cause these processes to timeout > eventually and clean themselves up? Is this a 2-way keepalive, in that if > the server process dies, the client connection would timeout, too? tcpKeepAlive just sets SO_KEEPALIVE on the client socket. These TCP keepalives are outgoing only. If you want to detect a dead client, you'll need to set the keepalive options on the server side. > on libpq, there's some options for the keepalive interval and count, but I > don't see any such in JDBC? Java's socket API only exposes SO_KEEPALIVE, not the finer tuning options, so we're stuck with the defaults. Oliver ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2011-10-19 00:12 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2011-10-18 23:42 jdbc tcpKeepAlive parameter John R Pierce <pierce@hogranch.com> 2011-10-19 00:12 ` Oliver Jowett <oliver@opencloud.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox