Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-29-2008, 01:30 PM
Junior Member
 
Join Date: Mar 2008
Posts: 11
Thumbs up I have reached my max_user_connection!? I never have before using ZF?

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-10-2008, 05:23 PM
Junior Member
 
Join Date: Mar 2008
Posts: 11
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-15-2008, 05:50 PM
Junior Member
 
Join Date: May 2008
Posts: 12
Default

How are you executing your queries? If you're using Zend_Db_Table, are you setting the default adapter?

Code:
$db = Zend_Db::factory($adapter, $config);
Zend_Db_Table_Abstract::setDefaultAdapter($db);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-15-2008, 06:31 PM
Junior Member
 
Join Date: Mar 2008
Posts: 11
Default

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-15-2008, 07:25 PM
Junior Member
 
Join Date: Jul 2008
Posts: 5
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:44 PM.