Server overloaded: DBCP issue on Mysql.

Posted by taras on Server Fault See other posts from Server Fault or by taras
Published on 2010-12-24T09:24:52Z Indexed on 2010/12/24 9:56 UTC
Read the original article Hit count: 319

Filed under:
|
|

Hi,

I have 2 setups tomcat5.5.20 on Redhat and mysql 4.1.22 on another Redhat server.

Recently i started getting the repeating error(each seconds) in catalina.out:

DBCP object created 2010-12-22 13:33:12 by the following code was never closed:
java.lang.Exception
 at org.apache.tomcat.dbcp.dbcp.AbandonedTrace.init(AbandonedTrace.java:96)
 at org.apache.tomcat.dbcp.dbcp.AbandonedTrace.(AbandonedTrace.java:79)
 at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.(DelegatingResultSet.java:71)
 at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.wrapResultSet(DelegatingResultSet.java:80)
 at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
 at org.apache.jsp.external_005fpage.signup_jsp._jspService(signup_jsp.java:1185)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
 at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
 at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
 at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:595)

i have to restart tomcat once a day when server load reaches 80-90%. Also catalina.out file is growing too fast which every few hours need to clear the logs.

My datasource config:

 <bean id="myDataSource"
    class="org.apache.tomcat.dbcp.dbcp.BasicDataSource"
    destroy-method="close">
    <property name="driverClassName">
        <value>com.mysql.jdbc.Driver</value>
    </property>

jdbc:mysql://XXX/XXX?autoReconnect=true 20 20

    <property name="maxIdle">
        <value>50</value>
    </property>

    <property name="maxActive">
        <value>50</value>
    </property>

    <property name="removeAbandoned">
        <value>false</value>
    </property>

    <property name="removeAbandonedTimeout">
        <value>2400</value>
    </property> 
    <property name="username">
        <value>XXX</value>
    </property>  
    <property name="password">
        <value>XXX</value>
    </property>
</bean>

Any idea what can be the issue ? Thanks for any direction.

© Server Fault or respective owner

Related posts about mysql

Related posts about tomcat