Have you tried pool2?

Gary

On Wed, Oct 1, 2014 at 4:46 AM, Ashish Chaudhary <
[email protected]> wrote:

> I am getting this error  *"INFO: Maximum number of threads (200) created
> for connector with address null and port 8080"*  on prod in approximately
> every 7-8 days. So to debug this issue I downloaded the thread dump file.
> This file has following thread state 100 times:
>
> "http-8080-198" daemon prio=10 tid=0x08a62c00 nid=0x3a78 in Object.wait()
> [0x66467000]
>    java.lang.Thread.State: WAITING (on object monitor)
>     at java.lang.Object.wait(Native Method)
>     - waiting on <0x87097728> (a
> org.apache.commons.pool.impl.GenericObjectPool$Latch)
>     at java.lang.Object.wait(Object.java:485)
>     at
>
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1104)
>     - locked <0x87097728> (a
> org.apache.commons.pool.impl.GenericObjectPool$Latch)
>
> My understanding is that there is some memory leak or the connection
> objects are not enough and because of this every call waits for new MySQL
> connection from the pool and it just hangs there and the thread associated
> with this MySQL call also waits. And this leads to this issue *"INFO:
> Maximum number of threads (200) created for connector with address null and
> port 8080"*
>
> So my questions are:
>
>     Is this exception because of mysql connection pool? If yes, what should
> I do to solve it? My MAX-Active value is 50 and MinIdle value is 1.
>
>     If this is not the case then how can I know which functionality are
> holding threads?
>
> Note: I'm not closing ResultSet, I'm closing only Statement and Connection
> can this might be the issue.
>



-- 
E-Mail: [email protected] | [email protected]
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to