Re: Hung backends

From: Joseph Shraibman <jks(at)selectacast(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Schmidt, Peter" <peter(dot)schmidt(at)prismedia(dot)com>, "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Hung backends
Date: 2000-11-27 23:53:02
Message-ID: 3A22F3DE.31F45B28@selectacast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
>
> "Schmidt, Peter" <peter(dot)schmidt(at)prismedia(dot)com> writes:
> > It turned out the Java VM was still running on the clients, keeping TCP
> > connections open (exactly as you suggested).
>
> Hmm, so the VM forgets to close connections belonging to a crashed
> Java thread? Seems like a severe deficiency in the VM to me...
>
> regards, tom lane

There is no such thing as a crashed java thread. It either terminated
or is still running. You are supposed to explictly close your
connections to the db in java. If you don't you will have to wait until
the Connection object is garbage collected for it to be closed. If your
java app is sitting around not doing much then it might never get around
to calling the garbage collector.

Bottom line:
1) expliclty close connections yourself
2) Call System.gc() from time to time if you need to.

--
Joseph Shraibman
jks(at)selectacast(dot)net
Increase signal to noise ratio. http://www.targabot.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message selkovjr 2000-11-28 00:03:33 Re: [HACKERS] Indexing for geographic objects?
Previous Message John Pilley 2000-11-27 23:16:56 Cannot createdb a database I just "destroydb"'d