|
|||
|
My web host just shut my site down because I was taking up 30% of the shared servers resources. I checked my error logs, and it is completely bloated with max_user_connections to my MySQL database.
Has anyone else ever have this problem? Is Zend_Db not closing the connection after a transaction properly? My site only gets about 1000 uniques a day, and my max_user_connection limit is 250? So something doesn't look right here. Anyone have any ideas? |
|
|||
|
I still am having this problem. Has no one else notice this happening to their site? My host shut my site down again, telling me that I have over 200 connections to my MySQL databases, and more than 30 of them were just sleeping?
I think this should be something Zend should def. be looking into. |
|
|||
|
Thanks for your interest in helping me!
I make all my mysql calls from classed that extend Zend_Db_Table. I set the adapter up in my bootstrap file like this: $config = new Zend_Config_Ini('../application/config.ini', 'production'); $registry = Zend_Registry::getInstance(); $registry->set('config', $config); // setup database $db = Zend_Db::factory($config->db->adapter, $config->db->config->toArray()); Zend_Db_Table::setDefaultAdapter($db); Any ideas why I am getting so many connections left open? |
|
|||
|
I'll list some my thoughts about your problem.
- check mysql slow queries log - or check the number of your queries per request using Zend_Db_Profiler (not accurate work with Zend_Db_* classes can produce a plenty of queries); - cache metadata; - increase max_user_connections (about 1000 should be OK, I think). Just a few ideas that came to my mind at once. If they won't help we'll try to think more ![]() |
![]() |
| Thread Tools | |
| Display Modes | |
|
|