Re: tomcat(7.0.56) is not releasing idle jdbc connections

2016-05-11 Thread Igor Cicimov
On 12 May 2016 9:00 am, "Igor Cicimov"  wrote:
>
>
> On 12 May 2016 12:16 am, "Niranjan Babu Bommu" 
wrote:
> >
> > I tried the same config on test stacks. numidle always "10" why it is
> > behaving differently in prod?
> >
> Are you sure your testing db config is identical to the prod one?
>
> >  >   auth="Container"
> >   type="javax.sql.DataSource"
> >   testWhileIdle="true"
> >   testOnBorrow="true"
> >   testOnReturn="false"
> >   fairQueue="false"
> >   validationQuery="SELECT 1"
> >   validationInterval="3"
> >   timeBetweenEvictionRunsMillis="3"
> >   maxActive="100"

Also according to your setup you can have up to 100 connections and since
this is a pool the connections will stay open and reused.

Regarding difference with test environment I assume it is simply because
you have different load ie much lower than prod hence less connections.

> >   maxIdle="10"
> >   minIdle="10"
> >   maxWait="1"
> >   initialSize="10"
> >   removeAbandonedTimeout="60"
> >   removeAbandoned="true"
> >   logAbandoned="true"
> >   minEvictableIdleTimeMillis="30"
> >   jmxEnabled="true"
> >
> >
jdbcInterceptors="ConnectionState;StatementFinalizer;ResetAbandonedTimer"
> >   username=""
> >   password=""
> >   driverClassName="com.mysql.jdbc.Driver"
> >
> >
url="jdbc:mysql:///?useServerPrepStmts=falseuseOldAliasMetadataBehavior=true"/>
> >
> > On Wed, May 11, 2016 at 7:35 AM, Niranjan Babu Bommu <
> > niranjan.bo...@gmail.com> wrote:
> >
> > > Hi Mark
> > > I have included defined data source in this mail, do you want me to
> > > include complete server.xml?
> > >
> > > thanks
> > > Niranjan
> > >
> > > On Wed, May 11, 2016 at 7:19 AM, Mark Thomas  wrote:
> > >
> > >> On 11/05/2016 11:58, Niranjan Babu Bommu wrote:
> > >> > Hi,
> > >> >
> > >> > we are migrating prod servers to tomcat, since we are doing it
slowly we
> > >> > have found an issue in jdbc connection pool, tomcat is not
releasing
> > >> idle
> > >> > jdbc connections, even we have tried setting maxIdle="10" but
"NumIdle
> > >> 97"
> > >> > always. due to this threads are piling up in database.
> > >> >
> > >> > I'm including my config here, can someone please help me out, how
to
> > >> > minimize idle jdbc connections.
> > >>
> > >> Where have you added the configuration below?
> > >>
> > >> Mark
> > >>
> > >>
> > >> >
> > >> >  > >> >   auth="Container"
> > >> >   type="javax.sql.DataSource"
> > >> >   testWhileIdle="true"
> > >> >   testOnBorrow="true"
> > >> >   testOnReturn="false"
> > >> >   fairQueue="false"
> > >> >   validationQuery="SELECT 1"
> > >> >   validationInterval="3"
> > >> >   timeBetweenEvictionRunsMillis="3"
> > >> >   maxActive="100"
> > >> >   maxIdle="10"
> > >> >   minIdle="10"
> > >> >   maxWait="1"
> > >> >   initialSize="10"
> > >> >   removeAbandonedTimeout="60"
> > >> >   removeAbandoned="true"
> > >> >   logAbandoned="true"
> > >> >   minEvictableIdleTimeMillis="30"
> > >> >   jmxEnabled="true"
> > >> >
> > >> >
> > >>
jdbcInterceptors="ConnectionState;StatementFinalizer;ResetAbandonedTimer"
> > >> >   username=""
> > >> >   password=""
> > >> >   driverClassName="com.mysql.jdbc.Driver"
> > >> >
> > >> >
> > >>
url="jdbc:mysql:///?useServerPrepStmts=falseuseOldAliasMetadataBehavior=true"/>
> > >> >
> > >> >
> > >>
> > >>
> > >> -
> > >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > >> For additional commands, e-mail: users-h...@tomcat.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > *Thanks*
> > > *Niranjan*
> > > *+1 781.956.6900 <%2B1%20781.956.6900>*
> > >
> >
> >
> >
> > --
> > *Thanks*
> > *Niranjan*
> > *+1 781.956.6900*


Re: tomcat(7.0.56) is not releasing idle jdbc connections

2016-05-11 Thread Igor Cicimov
On 12 May 2016 12:16 am, "Niranjan Babu Bommu" 
wrote:
>
> I tried the same config on test stacks. numidle always "10" why it is
> behaving differently in prod?
>
Are you sure your testing db config is identical to the prod one?

>auth="Container"
>   type="javax.sql.DataSource"
>   testWhileIdle="true"
>   testOnBorrow="true"
>   testOnReturn="false"
>   fairQueue="false"
>   validationQuery="SELECT 1"
>   validationInterval="3"
>   timeBetweenEvictionRunsMillis="3"
>   maxActive="100"
>   maxIdle="10"
>   minIdle="10"
>   maxWait="1"
>   initialSize="10"
>   removeAbandonedTimeout="60"
>   removeAbandoned="true"
>   logAbandoned="true"
>   minEvictableIdleTimeMillis="30"
>   jmxEnabled="true"
>
> jdbcInterceptors="ConnectionState;StatementFinalizer;ResetAbandonedTimer"
>   username=""
>   password=""
>   driverClassName="com.mysql.jdbc.Driver"
>
>
url="jdbc:mysql:///?useServerPrepStmts=falseuseOldAliasMetadataBehavior=true"/>
>
> On Wed, May 11, 2016 at 7:35 AM, Niranjan Babu Bommu <
> niranjan.bo...@gmail.com> wrote:
>
> > Hi Mark
> > I have included defined data source in this mail, do you want me to
> > include complete server.xml?
> >
> > thanks
> > Niranjan
> >
> > On Wed, May 11, 2016 at 7:19 AM, Mark Thomas  wrote:
> >
> >> On 11/05/2016 11:58, Niranjan Babu Bommu wrote:
> >> > Hi,
> >> >
> >> > we are migrating prod servers to tomcat, since we are doing it
slowly we
> >> > have found an issue in jdbc connection pool, tomcat is not releasing
> >> idle
> >> > jdbc connections, even we have tried setting maxIdle="10" but
"NumIdle
> >> 97"
> >> > always. due to this threads are piling up in database.
> >> >
> >> > I'm including my config here, can someone please help me out, how to
> >> > minimize idle jdbc connections.
> >>
> >> Where have you added the configuration below?
> >>
> >> Mark
> >>
> >>
> >> >
> >> >  >> >   auth="Container"
> >> >   type="javax.sql.DataSource"
> >> >   testWhileIdle="true"
> >> >   testOnBorrow="true"
> >> >   testOnReturn="false"
> >> >   fairQueue="false"
> >> >   validationQuery="SELECT 1"
> >> >   validationInterval="3"
> >> >   timeBetweenEvictionRunsMillis="3"
> >> >   maxActive="100"
> >> >   maxIdle="10"
> >> >   minIdle="10"
> >> >   maxWait="1"
> >> >   initialSize="10"
> >> >   removeAbandonedTimeout="60"
> >> >   removeAbandoned="true"
> >> >   logAbandoned="true"
> >> >   minEvictableIdleTimeMillis="30"
> >> >   jmxEnabled="true"
> >> >
> >> >
> >>
jdbcInterceptors="ConnectionState;StatementFinalizer;ResetAbandonedTimer"
> >> >   username=""
> >> >   password=""
> >> >   driverClassName="com.mysql.jdbc.Driver"
> >> >
> >> >
> >>
url="jdbc:mysql:///?useServerPrepStmts=falseuseOldAliasMetadataBehavior=true"/>
> >> >
> >> >
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
> >
> > --
> > *Thanks*
> > *Niranjan*
> > *+1 781.956.6900 <%2B1%20781.956.6900>*
> >
>
>
>
> --
> *Thanks*
> *Niranjan*
> *+1 781.956.6900*


Re: tomcat(7.0.56) is not releasing idle jdbc connections

2016-05-11 Thread Niranjan Babu Bommu
I'm re-posting my ds



On Wed, May 11, 2016 at 10:16 AM, Niranjan Babu Bommu <
niranjan.bo...@gmail.com> wrote:

> I tried the same config on test stacks. numidle always "10" why it is
> behaving differently in prod?
>
>auth="Container"
>   type="javax.sql.DataSource"
>   testWhileIdle="true"
>   testOnBorrow="true"
>   testOnReturn="false"
>   fairQueue="false"
>   validationQuery="SELECT 1"
>   validationInterval="3"
>   timeBetweenEvictionRunsMillis="3"
>   maxActive="100"
>   maxIdle="10"
>   minIdle="10"
>   maxWait="1"
>   initialSize="10"
>   removeAbandonedTimeout="60"
>   removeAbandoned="true"
>   logAbandoned="true"
>   minEvictableIdleTimeMillis="30"
>   jmxEnabled="true"
>
> jdbcInterceptors="ConnectionState;StatementFinalizer;ResetAbandonedTimer"
>   username=""
>   password=""
>   driverClassName="com.mysql.jdbc.Driver"
>
> url="jdbc:mysql:///?useServerPrepStmts=falseuseOldAliasMetadataBehavior=true"/>
>
> On Wed, May 11, 2016 at 7:35 AM, Niranjan Babu Bommu <
> niranjan.bo...@gmail.com> wrote:
>
>> Hi Mark
>> I have included defined data source in this mail, do you want me to
>> include complete server.xml?
>>
>> thanks
>> Niranjan
>>
>> On Wed, May 11, 2016 at 7:19 AM, Mark Thomas  wrote:
>>
>>> On 11/05/2016 11:58, Niranjan Babu Bommu wrote:
>>> > Hi,
>>> >
>>> > we are migrating prod servers to tomcat, since we are doing it slowly
>>> we
>>> > have found an issue in jdbc connection pool, tomcat is not releasing
>>> idle
>>> > jdbc connections, even we have tried setting maxIdle="10" but "NumIdle
>>> 97"
>>> > always. due to this threads are piling up in database.
>>> >
>>> > I'm including my config here, can someone please help me out, how to
>>> > minimize idle jdbc connections.
>>>
>>> Where have you added the configuration below?
>>>
>>> Mark
>>>
>>>
>>> >
>>> > >> >   auth="Container"
>>> >   type="javax.sql.DataSource"
>>> >   testWhileIdle="true"
>>> >   testOnBorrow="true"
>>> >   testOnReturn="false"
>>> >   fairQueue="false"
>>> >   validationQuery="SELECT 1"
>>> >   validationInterval="3"
>>> >   timeBetweenEvictionRunsMillis="3"
>>> >   maxActive="100"
>>> >   maxIdle="10"
>>> >   minIdle="10"
>>> >   maxWait="1"
>>> >   initialSize="10"
>>> >   removeAbandonedTimeout="60"
>>> >   removeAbandoned="true"
>>> >   logAbandoned="true"
>>> >   minEvictableIdleTimeMillis="30"
>>> >   jmxEnabled="true"
>>> >
>>> >
>>> jdbcInterceptors="ConnectionState;StatementFinalizer;ResetAbandonedTimer"
>>> >   username=""
>>> >   password=""
>>> >   driverClassName="com.mysql.jdbc.Driver"
>>> >
>>> >
>>> url="jdbc:mysql:///?useServerPrepStmts=falseuseOldAliasMetadataBehavior=true"/>
>>> >
>>> >
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>>
>>
>>
>> --
>> *Thanks*
>> *Niranjan*
>> *+1 781.956.6900 <%2B1%20781.956.6900>*
>>
>
>
>
> --
> *Thanks*
> *Niranjan*
> *+1 781.956.6900 <%2B1%20781.956.6900>*
>



-- 
*Thanks*
*Niranjan*
*+1 781.956.6900*


Re: tomcat(7.0.56) is not releasing idle jdbc connections

2016-05-11 Thread Niranjan Babu Bommu
I tried the same config on test stacks. numidle always "10" why it is
behaving differently in prod?



On Wed, May 11, 2016 at 7:35 AM, Niranjan Babu Bommu <
niranjan.bo...@gmail.com> wrote:

> Hi Mark
> I have included defined data source in this mail, do you want me to
> include complete server.xml?
>
> thanks
> Niranjan
>
> On Wed, May 11, 2016 at 7:19 AM, Mark Thomas  wrote:
>
>> On 11/05/2016 11:58, Niranjan Babu Bommu wrote:
>> > Hi,
>> >
>> > we are migrating prod servers to tomcat, since we are doing it slowly we
>> > have found an issue in jdbc connection pool, tomcat is not releasing
>> idle
>> > jdbc connections, even we have tried setting maxIdle="10" but "NumIdle
>> 97"
>> > always. due to this threads are piling up in database.
>> >
>> > I'm including my config here, can someone please help me out, how to
>> > minimize idle jdbc connections.
>>
>> Where have you added the configuration below?
>>
>> Mark
>>
>>
>> >
>> > > >   auth="Container"
>> >   type="javax.sql.DataSource"
>> >   testWhileIdle="true"
>> >   testOnBorrow="true"
>> >   testOnReturn="false"
>> >   fairQueue="false"
>> >   validationQuery="SELECT 1"
>> >   validationInterval="3"
>> >   timeBetweenEvictionRunsMillis="3"
>> >   maxActive="100"
>> >   maxIdle="10"
>> >   minIdle="10"
>> >   maxWait="1"
>> >   initialSize="10"
>> >   removeAbandonedTimeout="60"
>> >   removeAbandoned="true"
>> >   logAbandoned="true"
>> >   minEvictableIdleTimeMillis="30"
>> >   jmxEnabled="true"
>> >
>> >
>> jdbcInterceptors="ConnectionState;StatementFinalizer;ResetAbandonedTimer"
>> >   username=""
>> >   password=""
>> >   driverClassName="com.mysql.jdbc.Driver"
>> >
>> >
>> url="jdbc:mysql:///?useServerPrepStmts=falseuseOldAliasMetadataBehavior=true"/>
>> >
>> >
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>
>
> --
> *Thanks*
> *Niranjan*
> *+1 781.956.6900 <%2B1%20781.956.6900>*
>



-- 
*Thanks*
*Niranjan*
*+1 781.956.6900*


Re: tomcat(7.0.56) is not releasing idle jdbc connections

2016-05-11 Thread Niranjan Babu Bommu
Hi Mark
I have included defined data source in this mail, do you want me to include
complete server.xml?

thanks
Niranjan

On Wed, May 11, 2016 at 7:19 AM, Mark Thomas  wrote:

> On 11/05/2016 11:58, Niranjan Babu Bommu wrote:
> > Hi,
> >
> > we are migrating prod servers to tomcat, since we are doing it slowly we
> > have found an issue in jdbc connection pool, tomcat is not releasing idle
> > jdbc connections, even we have tried setting maxIdle="10" but "NumIdle
> 97"
> > always. due to this threads are piling up in database.
> >
> > I'm including my config here, can someone please help me out, how to
> > minimize idle jdbc connections.
>
> Where have you added the configuration below?
>
> Mark
>
>
> >
> >  >   auth="Container"
> >   type="javax.sql.DataSource"
> >   testWhileIdle="true"
> >   testOnBorrow="true"
> >   testOnReturn="false"
> >   fairQueue="false"
> >   validationQuery="SELECT 1"
> >   validationInterval="3"
> >   timeBetweenEvictionRunsMillis="3"
> >   maxActive="100"
> >   maxIdle="10"
> >   minIdle="10"
> >   maxWait="1"
> >   initialSize="10"
> >   removeAbandonedTimeout="60"
> >   removeAbandoned="true"
> >   logAbandoned="true"
> >   minEvictableIdleTimeMillis="30"
> >   jmxEnabled="true"
> >
> > jdbcInterceptors="ConnectionState;StatementFinalizer;ResetAbandonedTimer"
> >   username=""
> >   password=""
> >   driverClassName="com.mysql.jdbc.Driver"
> >
> >
> url="jdbc:mysql:///?useServerPrepStmts=falseuseOldAliasMetadataBehavior=true"/>
> >
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
*Thanks*
*Niranjan*
*+1 781.956.6900*


Re: tomcat(7.0.56) is not releasing idle jdbc connections

2016-05-11 Thread Mark Thomas
On 11/05/2016 11:58, Niranjan Babu Bommu wrote:
> Hi,
> 
> we are migrating prod servers to tomcat, since we are doing it slowly we
> have found an issue in jdbc connection pool, tomcat is not releasing idle
> jdbc connections, even we have tried setting maxIdle="10" but "NumIdle 97"
> always. due to this threads are piling up in database.
> 
> I'm including my config here, can someone please help me out, how to
> minimize idle jdbc connections.

Where have you added the configuration below?

Mark


> 
>auth="Container"
>   type="javax.sql.DataSource"
>   testWhileIdle="true"
>   testOnBorrow="true"
>   testOnReturn="false"
>   fairQueue="false"
>   validationQuery="SELECT 1"
>   validationInterval="3"
>   timeBetweenEvictionRunsMillis="3"
>   maxActive="100"
>   maxIdle="10"
>   minIdle="10"
>   maxWait="1"
>   initialSize="10"
>   removeAbandonedTimeout="60"
>   removeAbandoned="true"
>   logAbandoned="true"
>   minEvictableIdleTimeMillis="30"
>   jmxEnabled="true"
> 
> jdbcInterceptors="ConnectionState;StatementFinalizer;ResetAbandonedTimer"
>   username=""
>   password=""
>   driverClassName="com.mysql.jdbc.Driver"
> 
> url="jdbc:mysql:///?useServerPrepStmts=falseuseOldAliasMetadataBehavior=true"/>
> 
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org