Re: Connection attempt hangs when server is unresponsive

From: "Usama Dar" <munir(dot)usama(at)gmail(dot)com>
To: "Woody Woodring" <george(dot)woodring(at)iglass(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Connection attempt hangs when server is unresponsive
Date: 2007-12-06 12:23:35
Message-ID: ff0e67090712060423p2769cd7egd9dad5d49604b0d3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> My question is why this thread did not error out when it could not talk to
> the server? Could the server have been up when the connection started and
> went away in the middle causing errors? Could there be something we have
> overlooked in our conf that would time it out? When the db server came
> back, our thread count dropped from 200 down to 35 which is normal.
>
>
Look into

1- Setting the jdbc driver's login timeout
2- make sure that the connection attempts are not trying to do long name
resolution lookups
3- If you are using DBCP make sure tomcat is configured to remove abandoned
connections (removeAbandoned=true) and related parmeters are set to
reasonable value.

--
Usama Munir Dar http://linkedin.com/in/usamadar
Consultant Architect
Cell:+92 321 5020666
Skype: usamadar

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Usama Dar 2007-12-06 12:28:29 Re: java.io.EOFException
Previous Message Kris Jurka 2007-12-06 09:47:33 Re: BatchUpdate exception