On 10/1/14 1:46 AM, Ashish Chaudhary 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)
What version of [pool] are you running? I assume you are also using DBCP. Which version? > > 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. Most likely, you are just running out of connections. You can set maxActive higher, but if threads are holding connections, that will most likely just postpone the problem. > > If this is not the case then how can I know which functionality are > holding threads? You mean holding connections. If you look at the full thread dump, there must be some threads not waiting on the pool. Look at what those threads are doing. Phil > > Note: I'm not closing ResultSet, I'm closing only Statement and Connection > can this might be the issue. > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
