cancel
Showing results for 
Search instead for 
Did you mean: 

Magento site goes offline every night

Magento site goes offline every night

Hi there,

I have a simple service (Montastic) that monitors my Magento website (CE 1.9.2.4) using ping.  Every night at roughly 3:30am UK time the site goes offline for about 2 hours.  I've checked the cron tab & Magento cron and there doesn't seem to be anything happening at that time.  My only lead is that I happened to be up late on night and saw this error when the site was down:

SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: INSERT INTO `log_visitor` (`session_id`, `first_visit_at`, `last_visit_at`, `last_url_id`, `store_id`) VALUES (?, ?, ?, ?, ?)

#0 /var/www/as/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/as/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/as/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /var/www/as/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `lo...', Array)
#4 /var/www/as/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `lo...', Array)
#5 /var/www/as/lib/Zend/Db/Adapter/Abstract.php(576): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `lo...', Array)
#6 /var/www/as/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(453): Zend_Db_Adapter_Abstract->insert('log_visitor', Array)
#7 /var/www/as/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Log_Model_Visitor))
#8 /var/www/as/app/code/core/Mage/Log/Model/Visitor.php(198): Mage_Core_Model_Abstract->save()
#9 /var/www/as/app/code/core/Mage/Core/Model/App.php(1358): Mage_Log_Model_Visitor->initByRequest(Object(Varien_Event_Observer))
#10 /var/www/as/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Log_Model_Visitor), 'initByRequest', Object(Varien_Event_Observer))
#11 /var/www/as/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#12 /var/www/as/app/code/core/Mage/Core/Controller/Varien/Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
#13 /var/www/as/app/code/core/Mage/Core/Controller/Front/Action.php(69): Mage_Core_Controller_Varien_Action->preDispatch()
#14 /var/www/as/app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Core_Controller_Front_Action->preDispatch()
#15 /var/www/as/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#16 /var/www/as/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#17 /var/www/as/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#18 /var/www/as/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#19 /var/www/as/index.php(83): Mage::run('', 'store')
#20 {main}

I also believe that there are brute force attempts being bad on the the back end admin - I've installed the free Wyomind logwatch to see if I can find any more on that front.

 

There's nothing in the Magento system or exception logs that relates to these outages.

 

Does anyone have any ideas how I could investigate further (ideally without staying up all night!)

 

Thanks

Ben