Connection Pool problem in WAS


Performance and scalability: Connection Pool problem in WAS

  1. Connection Pool problem in WAS (6 messages)

    Hi All, We are using the WAS 6.1 app server(Cluster environment) and oracle database(10g). In the connection pool configuration we gave Minimum No of connection as 2 and Maximun No of connections as 30 with Connection time out parameter as 180. The problem is the connectivity between the appserver and the DB is getting disconnected some times and we are getting the following exception in the SystemErrlog. 2/7/09 22:08:33:877 GST 0000003a SystemErr R org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateC at org.hibernate.exception.SQLStateConverter.convert( at org.hibernate.exception.JDBCExceptionHelper.convert( ) at org.hibernate.exception.JDBCExceptionHelper.convert( ) at org.hibernate.jdbc.ConnectionManager.openConnection( at org.hibernate.jdbc.ConnectionManager.getConnection(
    at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement( 05) at org.hibernate.loader.Loader.prepareQueryStatement( at org.hibernate.loader.hql.QueryLoader.iterate( at org.hibernate.hql.ast.QueryTranslatorImpl.iterate( at org.hibernate.engine.query.HQLQueryPlan.performIterate( at org.hibernate.impl.SessionImpl.iterate( at org.hibernate.impl.QueryImpl.iterate( Caused by: Io exception: The Network Adapter could not establish the connectionDSRA0010E: SQL State = null, Error Code = 17,002 at sun.reflect.GeneratedConstructorAccessor136.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor at java.lang.reflect.Constructor.newInstance( at at at at va:1189) at ( at 1) at at at at ) at 431) at 400) at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceC at org.hibernate.jdbc.ConnectionManager.openConnection( ... 42 more Can any one tell me how to resolve this error. Thanks & Regards, Cva.

    Threaded Messages (6)

  2. Reply[ Go to top ]

    We also face this issue and going through IBM documentation they suggest to try and establish the connection again. So we have built 3 retries in our application framework for this specific exception. We have seen this exception happens when connection is idle for long time, and usually the 1st retry resolves this..
  3. Re: Reply[ Go to top ]

    thank's rajiv for u r reply, There are different scenarios which this exception will occurs.Those are StaleConnectionException: This exception ( indicates that the connection currently being held is no longer valid. This can occur for numerous reasons, including the following: 1 The application tries to get a connection and fails, as when the database is not started. 2 A connection is no longer usable due to a database failure. When an application tries to use a connection it has previously obtained, the connection is no longer valid. In this case, all connections currently in use by an application could get this error when they try to use the connection. 3 The application using the connection has already called close() and then tries to use the connection again. 4 The connection has been orphaned because the application had not used it in at most two times the orphan timeout; then the application tries to use the orphaned connection. 5 The application tries to use a JDBC resource, such as a statement, obtained on a now-stale connection. U metioned that "we have built 3 retries in our application framework" .can u please explain me how u build those retries...........
  4. Reply[ Go to top ]

    In our db access code where we create preparedStatement / statement from connection and execute query , we are specifically catching the StaleConnectionException, if we get that exception, we get the fresh connection and again try to create statement / execute query from the fresh connection... this is in a loop with max iterations as 3 (configurable)
  5. Re: Reply[ Go to top ]

    Thanks Rajiv. The issue had been solved..there is some problem in the network connectivity between appserver and dbserver which has been solved by the network i am not getting the error....
  6. Hello Sivakumar, do you mind posting your network problem/solution? I have the same issue here, when I shutdown my main database for a maintenance work and my secondary becames primary I need to restart the app server to make it see the new one! I just got this issue, I need to check a few more things, but if you could post your context/solution I definitely would appreciate. thanks! Claudio
  7. maybe try this?[ Go to top ]

    Hi, we had similar problems. we connect to DB2 and had set min conn pool to 1 originally and on some of our long running processes we'd get null or missing connection. we met with IBM and they suggested setting min connections to 0. they thought that the db was timing out but WAS was keeping the connection open. so next use of connection failed. we set min connections to 0 and it fixed our problem. not sure if this is the same issue as yours but it is easy enough to try. good luck.