commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashish Chaudhary <ashishchaudhar...@gmail.com>
Subject [pool]
Date Wed, 01 Oct 2014 08:46:32 GMT
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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message