wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes jboss + Mysql Connection pool issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "jboss + Mysql Connection pool issue" Watch "jboss + Mysql Connection pool issue" New topic

jboss + Mysql Connection pool issue

Mallik Avula
Ranch Hand

Joined: Nov 30, 2006
Posts: 86
We have issue with connection pool in jboss. We are facing "No Managed Connections" issue. I can see some other also facing the same.
I guess, Connection pool workings well for normal cases.
But I have few queries,
1. Will connection return to pool if there connection got SQLException(Ex: be lock timeout)? We are closing resultset, statement & connection.

2. Do we need to take any extra pre-cautions when reading a "blob"(In Mysql "text) columns?

3. Is there any issue with jboss at destroying a connection and re-creating it? Like, when there are on-demand created connections, pool will destroy those and will create again when needed. I heard, Once a connection destroyed, jboss will hangup if attempt to create new connection. Is it right?

Thanks & Regards<br />Mallik Avula<br />SCJP1.4
Peter Johnson

Joined: May 14, 2008
Posts: 5812

It's been a while since I debugged connection issues but here are some things that always helped me:

Have you looked in MySQL to see what connections are open and what those connections were doing? That might give you some clue.

Also, a thread dump might let you know if some requests are still actively holding connections.

I vaguely recall an issue with exceptions and connections not being released, but cannot seem to find the discussion.

JBoss In Action
Mallik Avula
Ranch Hand

Joined: Nov 30, 2006
Posts: 86
Thanks Peter,

We are trying to see which connection executed for a long time from MySQL end. Because this is happening in production and we are not able to predict when it will be.

And we deployed a small war to take the threaddump, but not able to analyse it. can you please advise how to analyse threads holding the connection.
It is sorta covered in the JavaRanch Style Guide.
subject: jboss + Mysql Connection pool issue
Similar Threads
Recommended Idle-timeout in JBoss
Connection Pool Dirty Connection?
Jboss connection pool not releasing the connection from pool
java.sql.SQLException: No available resource. Wait-time expired.
question about getConnection(usr,pwd)