Verify your max connection is set high enough for the amount of traffic you
see in your access logs that would be making a call to the DB.  Possible
code is not properly closing DB connections.  Remove abandoned connections.


add to your data source config

<Resource
        name="xxxxxxxxDS"
        auth="Container"
        url="jdbc:mysql://<FQDN>:3306/XXXXXX"
        driverClassName="com.mysql.jdbc.Driver"
        password="XXXXXXXXX"
        username="user"
        type="javax.sql.DataSource"
        factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
        testWhileIdle="true"
        testOnBorrow="true"
        testOnReturn="false"
        validationQuery="SELECT 1"
        validationInterval="30000"
        timeBetweenEvictionRunsMillis="30000"
       * maxActive="10"*
        minIdle="10"
        maxWait="10000"
        initialSize="10"
      *  removeAbandonedTimeout="60"*
*        removeAbandoned="true"*
*        logAbandoned="true"*
        minEvictableIdleTimeMillis="30000"
        jmxEnabled="true"
/>



On Thu, Feb 15, 2018 at 6:03 AM, Mark Thomas <ma...@apache.org> wrote:

> On 15/02/18 00:35, Halder, Arpan [ITSUS Non J&J] wrote:
> > Hi All,
> >
> > Need urgent help. We are using apache tomcat version -7.0.67  and
> sporadically facing issue that application become unresponsive and below
> error message encountered in Catalina.out log:
> >
> > ExceptionCannot get a connection, pool error Timeout waiting for idle
> object
> > Exception in detailorg.apache.tomcat.dbcp.dbcp.SQLNestedException:
> Cannot get a connection, pool error Timeout waiting for idle object
> > within doFilter of Session Filter
> > url :::::/SPECTRA/login
> > Chain.doFilter()..
> > Inside Login Method.........
> >
> > We had to restart tomcat service every time and issue gets resolved for
> the time being and again reappears sporadically. Could you please advise if
> we need to change any tomcat setting to mitigate this issue from happening
> in future.
> >
> > Please let us know if you need anything else from my side in this
> regards. Thank you in advance.
>
> It sounds like you have a connection leak in your application. Enable
> abandoned connection logging to find out where the leaked connections
> are being created.
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
*Peggy Bauer*
CAO Production Support
214-770-1782

Reply via email to