I'm having the problem, with the same configuration.
(apache-tomcat-5.5.16, hibernate 3.1.3, and the C3P0 version delivered with hibernate)
I changed from the tomcat database connection pool system to the C3P0 connection pool system.(because tomcat didn't seem to close the connections properly, causing the server to crash). Since I changed to C3P0 I also got the
Code:
APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
Error. Maybe the 2 problems are related, really no idea
with the mysql show status command, I see the following values increasing(I just restarted my server, so the values aren't that big yet);
mysql> show status
-> ;
+-----------------------------------+----------+
| Variable_name | Value |
+-----------------------------------+----------+
| Aborted_clients | 10 |
| Aborted_connects | 4 |
If anyone has any idea how to track down this problem.
executing 'SET GLOBAL thread_cache_size=8;' in mysql gave a hudge perfomace gain.
The mysql manual say the following about this variable.
Quote:
This variable can be increased to improve performance
if you have a lot of new connections. (Normally, this doesn't provide a notable performance
improvement if you have a good thread implementation.)
So I guesse I don't have a good thread implementation. I have no idea how to check this.
Any help would be welcome