Re: executeQuery hangs on busy server - PROPOSAL: socketTimeout parameter

From: Andrea Spinelli <aspinelli(at)imteam(dot)it>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: executeQuery hangs on busy server - PROPOSAL: socketTimeout parameter
Date: 2007-08-10 16:53:45
Message-ID: 46BC9819.4000807@imteam.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kris Jurka wrote:

> On Fri, 10 Aug 2007, Andrea Spinelli wrote:
>
>
> I believe this is a bug in the 8.1 windows port. What's the exact
> version you are using? I think this was fixed in 8.1.6.

The exact version I am using is 8.1.4 - so my version is old - good!
There is hope that upgrading will fix everything!

>
> People want the query to be stopped, but they don't want their whole
> connection to be killed which is what your change does.
>
I see your point, but - as far as I know - there is no way of
interrupting a running query (short of exiting from the main
executable); so maybe a (large) timeout would be a safe way of
protecting against trouble. As to killing the connection, using a
connection pool may mitigate the problem.

Better a broken connection in a running thread than a useless thread
which cannot be interrupted!

Of course, my perspective is mainly related to web applications -
standalone applications might use other techniques.

Anyway, if you plan to support query timeouts, as you suggest in another
message, that would be perfect.

IMHO, depending on your plans, the "socketTimeout" strategy could be a
temporary fix if the "setQueryTimeout" is too far in the future.

Just my suggestions after a week of stress-testing a busy server! I love
postgreSQL and thank everybody for their efforts here!

Andrea Spinelli

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2007-08-11 23:22:18 Re: executeQuery hangs on busy server - PROPOSAL: socketTimeout parameter
Previous Message Kris Jurka 2007-08-10 16:20:45 Re: executeQuery hangs on busy server - PROPOSAL: socketTimeout parameter