Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Odd PostgreSQL problem

  1. #11

    Default

    I talked to the sysadmin and he said the network has a short TCP timeout so there's 2 C3P0 properties I'm looking at to get around this:

    maxIdleTime & idleConnectionTestPeriod. I could use the maxIdleTime to just say if the connection is idle for 15 minutes, then discard it. I think that would eliminate the problem, but I'd rather not get rid of them in case of a surge of users after some dead time and there's no connections available. So that's why I was looking at the idleConnectionTestPeriod, to test the connections every 10 minutes or so, so they won't break and the Exception won't be thrown. This is all theoretical until I see if the exception happens again or not.
    PJ

  2. #12
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    In this case adjust idleConnectionTestPeriod to be shorter then the TCP timeout and if it works (it should) start from there increasing the value. After all if you say the scenario is going to be changed I wouldn't worry about optimizing the network configuration at this point.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #13

    Default

    That's basically what I'm doing now. I set the idleConnectionTestPeriod to 10 minutes and haven't gotten the exception since then so I'm happy to have this solved for the interim until the server gets moved.
    PJ

  4. #14
    Join Date
    Oct 2005
    Posts
    6

    Default Switching from DBCP to C3P0 worked for us also

    We were getting mysterious connection closed exceptions from PostgreSQL with our application. Switching from DBCP to C3P0 eliminated them. Thanks for the info in this thread, very helpful.

    -Walter Gillett

Similar Threads

  1. Replies: 2
    Last Post: Jul 14th, 2005, 10:50 AM
  2. Replies: 1
    Last Post: Jul 5th, 2005, 03:48 AM
  3. pagination and continuation problem in SWF
    By yfmoan in forum Web Flow
    Replies: 6
    Last Post: Jun 29th, 2005, 03:42 AM
  4. Replies: 0
    Last Post: Feb 16th, 2005, 01:45 PM
  5. Lazy Load Problem when Doing UnitTest
    By yoshi in forum Data
    Replies: 7
    Last Post: Sep 29th, 2004, 10:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •