Re: Query timeout in dbcp

From: Martin Gainty <mgainty(at)hotmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, <arvindwill(at)gmail(dot)com>
Subject: Re: Query timeout in dbcp
Date: 2009-06-02 13:32:31
Message-ID: BLU142-W8E3910D9D8D671126741FAE4D0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


http://pgtclng.projects.postgresql.org/pgtcldocs-20070115/pgtcl-example-asyncevent.html

an asynchronous callback that is called after specified number of secs and cancels the query
re-posting to postgres users list for more clarification

Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung
Ez az
üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

> From: arvindwill(at)gmail(dot)com
> Date: Tue, 2 Jun 2009 17:47:39 +0530
> Subject: Re: Query timeout in dbcp
> To: users(at)tomcat(dot)apache(dot)org
>
> Hi Martin & Chris,
> Thing i actually need is, if a query executed from web application then it
> shold not execute more then 22mins. If it execute more then that means query
> shold be cancelled from postgres and java should get exception on this
> event. Is it possible?
>
> Thanks,
> Arvind S
>
> *
> "Many of lifes failure are people who did not realize how close they were to
> success when they gave up."
> -Thomas Edison*
>
>
> On Tue, Jun 2, 2009 at 2:40 AM, Christopher Schultz <
> chris(at)christopherschultz(dot)net> wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Arvind,
> >
> > On 6/1/2009 3:26 PM, S Arvind wrote:
> > > Is there any possibility to mention max time a query can execute from
> > DBCP
> > > side?
> >
> > What do you want to happen after the timeout? The connection execute*
> > method throws an exception? That is going to be very database-specific.
> >
> > Martin's response about using removeAbandoned="true" is not going to
> > help: this will only remove the connection from the connection pool...
> > it won't interfere with its operation in any way.
> >
> > Is there some kind of query you can execute on the client side that will
> > modify the connection properties? You could make that the
> > "validationQuery" for your connection.
> >
> > - -chris
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.9 (MingW32)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> >
> > iEYEARECAAYFAkokQ78ACgkQ9CaO5/Lv0PD8zgCgsdVaJGsaFkz50mO0nkip/uJb
> > a3IAnA0W6Unug48rmCs94SYa6L5OkGEy
> > =1LuH
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe(at)tomcat(dot)apache(dot)org
> > For additional commands, e-mail: users-help(at)tomcat(dot)apache(dot)org
> >
> >

_________________________________________________________________
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2009-06-02 13:33:46 Re: newbie table design question
Previous Message Merlin Moncure 2009-06-02 13:27:25 Re: newbie table design question