List:General Discussion« Previous MessageNext Message »
From:Dhaval Jaiswal Date:May 6 2011 10:12am
Subject:Fwd: DBCP error
View as plain text  
Hi All,

 We are frequently getting DBCP error. We have seen this error in
catalina.log & apps log. This issue has started since last 2 -3 days. We
have checked the application code when this error has occured and assure
that there is no connection leakage in code. Mysql server is also running
fine. We have tune memory parameters in mysql, however effectless. Still we
are getting the same error.

 Any suggestion/solution would be appreciated.


 Mysql server version: 5.0.45

JDBC version: mysql-connector-java-5.1.5-bin.jar

apache Tomcat version: 6.0.16


 server.xml parameters are as follows::


 url="jdbc:mysql://hostname:3306/dbname" username="user" password="pass"
maxActive="40" maxIdle="20" maxWait="5000"



 ERROR:


 2011-05-05 16:32:57,666 [ajp-8009-177] ERROR TrainSearchResultCache.java -
Error retrieving Train Search from DB: s-

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection,
pool error Timeout waiting for idle object

        at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)

        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

        at
com.eos.gds.data.DatabaseManager.getConnection(DatabaseManager.java:73)

        at
com.eos.gds.data.DatabaseManager.getConnection(DatabaseManager.java:60)

............................................

Caused by: java.util.NoSuchElementException: Timeout waiting for idle object

        at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:958)

        at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)

        at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)

        ... 28 more


  com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
link failure

 Last packet sent to the server was 24 ms ago.

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)

        at
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)

        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2873)

        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2763)

        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3299)

        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1837)

        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1961)

        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2543)

        at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1737)

        at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2022)

        at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1940)

        at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1925)

        at
org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)

        at
com.eos.gds.cache.FareQuoteDBCache.storeItinQuotesIntoPresistentCache(FareQuoteDBCache.java:1029)

        at
com.eos.gds.cache.FareQuoteDBCache.processInputQueue(FareQuoteDBCache.java:899)

        at
com.eos.gds.cache.FareQuoteDBCache.access$000(FareQuoteDBCache.java:37)

        at
com.eos.gds.cache.FareQuoteDBCache$1.run(FareQuoteDBCache.java:103)

        at java.lang.Thread.run(Thread.java:619)

Caused by: java.net.SocketException: Socket closed

        at java.net.SocketInputStream.socketRead0(Native Method)

        at java.net.SocketInputStream.read(SocketInputStream.java:129)

        at
com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)

        at
com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)

        at
com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)

        at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2329)

        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2774)




-- 
Regards,
Dhaval Jaiswal




-- 
Regards,
Dhaval Jaiswal

Thread
Segmentation fault on a RAQ2 sysDaV3|D3)4 Aug
  • Segmentation fault on a RAQ2 syssinisa4 Aug
  • Fwd: DBCP errorDhaval Jaiswal6 May
    • Re: Fwd: DBCP errorNigel Wood6 May
      • Re: Fwd: DBCP errorDhaval Jaiswal11 May
    • RE: DBCP errorMartin Gainty6 May
      • Re: DBCP errorDhaval Jaiswal1 Jun
Re: DBCP errorDhaval Jaiswal11 May
  • DBCP errorDhaval Jaiswal12 May