pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
application handing on send
3+ messages / 2 participants
[nested] [flat]

* application handing on send
@ 2004-05-28 15:30 Warren Little <wlittle@securitylending.com>
  2004-05-28 17:16 ` Re: application handing on send Warren Little <wlittle@securitylending.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Warren Little @ 2004-05-28 15:30 UTC (permalink / raw)
  To: pgsql-jdbc

My tomcat application occasionally hangs trying push data to the
postgres backend.  When I view the connection to postgres with netstat I
see data sitting in the sendQ on the socket.
There is a firewall (cisco pix) between the tomcat server and the
database server.
I was wondering if there is some way to set the timeout on the driver as
to force a IO exception and terminate the jdbc request.
 
 
-- 
Warren Little
Senior Vice President
Secondary Marketing
Security Lending Wholesale, LC
www.securitylending.com
Tel: 866-369-7763
Fax: 866-849-8079



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: application handing on send
  2004-05-28 15:30 application handing on send Warren Little <wlittle@securitylending.com>
@ 2004-05-28 17:16 ` Warren Little <wlittle@securitylending.com>
  2004-05-30 19:26   ` Re: application handing on send shadowd@connection.com
  0 siblings, 1 reply; 3+ messages in thread

From: Warren Little @ 2004-05-28 17:16 UTC (permalink / raw)
  To: pgsql-jdbc

Question to my own question:
 Is there even such a mechanism in the Socket class to do a timeout on a
write?

On Fri, 2004-05-28 at 09:30, Warren Little wrote:
> My tomcat application occasionally hangs trying push data to the
> postgres backend.  When I view the connection to postgres with netstat I
> see data sitting in the sendQ on the socket.
> There is a firewall (cisco pix) between the tomcat server and the
> database server.
> I was wondering if there is some way to set the timeout on the driver as
> to force a IO exception and terminate the jdbc request.
>  
-- 
Warren Little
Senior Vice President
Secondary Marketing
Security Lending Wholesale, LC
www.securitylending.com
Tel: 866-369-7763
Fax: 866-849-8079



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: application handing on send
  2004-05-28 15:30 application handing on send Warren Little <wlittle@securitylending.com>
  2004-05-28 17:16 ` Re: application handing on send Warren Little <wlittle@securitylending.com>
@ 2004-05-30 19:26   ` shadowd@connection.com
  0 siblings, 0 replies; 3+ messages in thread

From: shadowd@connection.com @ 2004-05-30 19:26 UTC (permalink / raw)
  To: Warren Little <wlittle@securitylending.com>; +Cc: pgsql-jdbc

Socket.setSoTimeout(int timeout) will do this on most platforms. Once set, any
blocking read will throw a java.net.SocketTimeoutException (subclass of
java.io.IOException) when the read times out. Like I said, this doesn't work on
*ALL* platforms, but I think Windoze and Linux are supported.

> Question to my own question:
>  Is there even such a mechanism in the Socket class to do a timeout on a
> write?
> 
> On Fri, 2004-05-28 at 09:30, Warren Little wrote:
> > My tomcat application occasionally hangs trying push data to the
> > postgres backend.  When I view the connection to postgres with netstat I
> > see data sitting in the sendQ on the socket.
> > There is a firewall (cisco pix) between the tomcat server and the
> > database server.
> > I was wondering if there is some way to set the timeout on the driver as
> > to force a IO exception and terminate the jdbc request.
> >  
> -- 
> Warren Little
> Senior Vice President
> Secondary Marketing
> Security Lending Wholesale, LC
> www.securitylending.com
> Tel: 866-369-7763
> Fax: 866-849-8079
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
> 







^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-05-30 19:26 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-05-28 15:30 application handing on send Warren Little <wlittle@securitylending.com>
2004-05-28 17:16 ` Warren Little <wlittle@securitylending.com>
2004-05-30 19:26   ` shadowd@connection.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