Hello,
I have searched on these forums for this bug but nothing solid came up. I am using drupal 4.7.3 with php 5.1.6 and mysql 4.1.21. My old site did not use drupal (oscommerce) and this bug never came up. Saying that, it seems that some of the connections is not disconnected after a page completely loads. I get many connections a day that are sleeping. If I don't manually delete them throughtout the day I will reach my maximum connections which is set at 50.
My server guy doesn't think it is a mysql thing and I don't as well since my old site didn't cause this. We are wondering if drupal needs to be told somewhere in the code to disconnect the mysql connections within php?
Any tips would be appreciated.
Comments
persistent connections
Perhaps this thread will be helpful: http://drupal.org/node/80556 (especially comment #10).
Sleeping connections aren't bad by themselves
Sleeping connections are just resources waiting to be reused. It depends on thread_cache value. It seems to me that 50 max_connections might be too little.
Is your mysql server located on a separate box. If not, the bottleneck might be caused by something else.
How about your query cache? or, if your tables are InnoDB, how about your buffer pool hit ratio? Also, trying to detect slow queries could tell you a bit more information on where the problem might be.
There's a page in the handbook with tips for tuning here and there...
Cheers
Doubt is the beginning, not the end of wisdom.