Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 5 of 5
I am getting alot of SQL errors
 
moleygunn
Member
 
Total Posts:  73
Joined:  2008-11-25
 

I’m occasionally getting ‘General error: 2006 MySQL server has gone away’ too. Anyone got a fix?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 

Hello,

The solution is to change a SQL variable at server.

Modify wait_timeout value to 300, at least. Ask your hosting provider to change it.

Good luck.

 
Magento Community Magento Community
Magento Community
Magento Community
 
shaun
Member
 
Avatar
Total Posts:  39
Joined:  2007-11-09
Todmorden, UK
 
XOXO - 07 May 2009 06:53 AM

Hello,

The solution is to change a SQL variable at server.

Modify wait_timeout value to 300, at least. Ask your hosting provider to change it.

Good luck.

That might work if you’ve got your own dedicated server, plenty of RAM and your server isn’t busy but leaving idle database connections open for 5 minutes is just not viable on shared hosting.

Just what is Magento doing that requires an open connection for that long? Surely if there’s something that slow they need to be checking if the connection is still there rather than reporting it’s gone away and throwing an error?

 
Magento Community Magento Community
Magento Community
Magento Community
 
moleygunn
Member
 
Total Posts:  73
Joined:  2008-11-25
 

Hi Shaun!

I’m actually hosted with you guys. It’s a great service. Any idea why this might be happening?

 
Magento Community Magento Community
Magento Community
Magento Community
 
shaun
Member
 
Avatar
Total Posts:  39
Joined:  2007-11-09
Todmorden, UK
 

I think we were maybe a little aggressive with our timeouts for Magento so I’ve upped them recently on your server and added in some extra RAM for the database cache. I think that should improve matters. If not drop me a support ticket though.

Still, I think Varien need to have a look at why longer timeouts are being suggested as a band-aid to these kinds of errors. Otherwise we’ll have to ramp up server requirements.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Allysin
Sr. Member
 
Avatar
Total Posts:  215
Joined:  2008-04-03
 

Hi,

we’re having the same problem - I asked our hosting provider (we have a reseller account with them) and got the following answer:

“Unfortunately, we can not increase this for you. You will need to upgrade to a VPS or dedicated server for this.”

We’re running Magento version 1.3.1

Is there any way to get around this without having the extra expense of getting the VPS or dedicated server?

Here is the Error - it comes up when loggin in and also when trying to do various things within the Admin panel:

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
Trace:
#0 /home/flowers/public_html/lib/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/flowers/public_html/lib/Zend/Db/Adapter/Abstract.php(457): Zend_Db_Statement->execute(Array)
#2 /home/flowers/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(230): Zend_Db_Adapter_Abstract->query(’select * from a...’, Array)
#3 /home/flowers/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(259): Zend_Db_Adapter_Pdo_Abstract->query(’select * from a...’, Array)
#4 /home/flowers/public_html/lib/Zend/Db/Adapter/Abstract.php(668): Varien_Db_Adapter_Pdo_Mysql->query(’select * from a...’, Array)
#5 /home/flowers/public_html/app/code/core/Mage/Admin/Model/Mysql4/Acl.php(74): Zend_Db_Adapter_Abstract->fetchAll(’select * from a...’)
#6 /home/flowers/public_html/app/code/core/Mage/Admin/Model/Session.php(80): Mage_Admin_Model_Mysql4_Acl->loadAcl()
#7 /home/flowers/public_html/app/code/core/Mage/Admin/Model/Observer.php(55): Mage_Admin_Model_Session->login(’Jan’, ‘Oxford2003’, Object(Mage_Core_Controller_Request_Http))
#8 /home/flowers/public_html/app/code/core/Mage/Core/Model/App.php(1167): Mage_Admin_Model_Observer->actionPreDispatchAdmin(Object(Varien_Event_Observer))
#9 /home/flowers/public_html/app/Mage.php(301): Mage_Core_Model_App->dispatchEvent(’controller_acti...’, Array)
#10 /home/flowers/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(410): Mage::dispatchEvent(’controller_acti...’, Array)
#11 /home/flowers/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(130): Mage_Core_Controller_Varien_Action->preDispatch()
#12 /home/flowers/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(356): Mage_Adminhtml_Controller_Action->preDispatch()
#13 /home/flowers/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(247): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#14 /home/flowers/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /home/flowers/public_html/app/Mage.php(457): Mage_Core_Controller_Varien_Front->dispatch()
#16 /home/flowers/public_html/index.php(52): Mage::run()
#17 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
templatemela
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2009-05-08
India
 

it’s all about your memory size.  It’s all the game of RAM and number of process create my magento.  You can increase memory size on your htaccess or php.ini on root . hope this helps.  Also remove unnecessary files. You can use attached files for clean up magento .

File Attachments
cleanme.php  (File Size: 5KB - Downloads: 255)
 
Magento Community Magento Community
Magento Community
Magento Community
 
AH Collezioni
Jr. Member
 
Total Posts:  1
Joined:  2010-06-30
http://www.ahcollezioni.com
 

set session max_allowed_packet=16000000;

but also in the my.ini config file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mounish
Jr. Member
 
Total Posts:  14
Joined:  2010-09-22
 

I am getting below error : i added 2 simple products with custom options, and then tried to make a configure product using it, and found the error. if i dont add custom options to simple products, and then configure it, it works fine, but in which ever products i add custom options and configure it, i find below error : if any one could help…

SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.

Trace:
#0 D:\wamp\www\gemtravels\lib\Zend\Db\Adapter\Pdo\Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 D:\wamp\www\gemtravels\lib\Varien\Db\Adapter\Pdo\Mysql.php(251): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 D:\wamp\www\gemtravels\lib\Zend\Db\Adapter\Abstract.php(459): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 D:\wamp\www\gemtravels\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query(’SET NAMES utf8’, Array)
#4 D:\wamp\www\gemtravels\lib\Varien\Db\Adapter\Pdo\Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query(’SET NAMES utf8’, Array)
#5 D:\wamp\www\gemtravels\app\code\core\Mage\Core\Model\Resource\Type\Db\Pdo\Mysql.php(45): Varien_Db_Adapter_Pdo_Mysql->query(’SET NAMES utf8’)
#6 D:\wamp\www\gemtravels\app\code\core\Mage\Core\Model\Resource.php(93): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(Mage_Core_Model_Config_Element))
#7 D:\wamp\www\gemtravels\app\code\core\Mage\Core\Model\Resource\Setup.php(83): Mage_Core_Model_Resource->getConnection(’core_setup’)
#8 D:\wamp\www\gemtravels\app\code\core\Mage\Core\Model\Resource\Setup.php(160): Mage_Core_Model_Resource_Setup->__construct(’core_setup’)
#9 D:\wamp\www\gemtravels\app\code\core\Mage\Core\Model\App.php(399): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#10 D:\wamp\www\gemtravels\app\code\core\Mage\Core\Model\App.php(329): Mage_Core_Model_App->_initModules()
#11 D:\wamp\www\gemtravels\app\Mage.php(627): Mage_Core_Model_App->run(Array)
#12 D:\wamp\www\gemtravels\index.php(80): Mage::run(’’, ‘store’)
#13 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 5 of 5