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

Urgent: Website working perfect for 6 months.. all of a sudden the website is down due to a server error. 
 
JoeNmass
Member
 
Avatar
Total Posts:  50
Joined:  2008-03-07
 

I need some help with this pretty quickly if anyone can help. No one can access my frontend of my website because of the following error that is shown on the screen. Does anyone have any idea how I can resolve this error??? Nothing has been added or deleted to the website on my part for better than a week and was working perfect just the day before this error occured. Did the database somehow get hacked into it???

SQLSTATE[42000]Syntax error or access violation1142 INSERT command denied to user 'dbo243780939'@'74.208.16.39' for table 'log_visitor'
Trace:
#0 /homepages/38/d113883576/htdocs/magentoV1/magento/lib/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array)
#1 /homepages/38/d113883576/htdocs/magentoV1/magento/lib/Zend/Db/Adapter/Abstract.php(406): Zend_Db_Statement->execute(Array)
#2 /homepages/38/d113883576/htdocs/magentoV1/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract->query('INSERT INTO `lo...', Array)
#3 /homepages/38/d113883576/htdocs/magentoV1/magento/lib/Zend/Db/Adapter/Abstract.php(484): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `lo...', Array)
#4 /homepages/38/d113883576/htdocs/magentoV1/magento/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(343): Zend_Db_Adapter_Abstract->insert('log_visitor', Array)
#5 /homepages/38/d113883576/htdocs/magentoV1/magento/app/code/core/Mage/Core/Model/Abstract.php(235): Mage_Core_Model_Mysql4_Abstract->save(Object(Mage_Log_Model_Visitor))
#6 /homepages/38/d113883576/htdocs/magentoV1/magento/app/code/core/Mage/Log/Model/Visitor.php(136): Mage_Core_Model_Abstract->save()
#7 /homepages/38/d113883576/htdocs/magentoV1/magento/app/code/core/Mage/Core/Model/App.php(1039): Mage_Log_Model_Visitor->initByRequest(Object(Varien_Event_Observer))
#8 /homepages/38/d113883576/htdocs/magentoV1/magento/app/Mage.php(278): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#9 /homepages/38/d113883576/htdocs/magentoV1/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(377): Mage::dispatchEvent('controller_acti...', Array)
#10 /homepages/38/d113883576/htdocs/magentoV1/magento/app/code/core/Mage/Core/Controller/Front/Action.php(40): Mage_Core_Controller_Varien_Action->preDispatch()
#11 /homepages/38/d113883576/htdocs/magentoV1/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(335): Mage_Core_Controller_Front_Action->preDispatch()
#12 /homepages/38/d113883576/htdocs/magentoV1/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(159): Mage_Core_Controller_Varien_Action->dispatch('index')
#13 /homepages/38/d113883576/htdocs/magentoV1/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(146): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#14 /homepages/38/d113883576/htdocs/magentoV1/magento/app/Mage.php(427): Mage_Core_Controller_Varien_Front->dispatch()
#15 /homepages/38/d113883576/htdocs/magentoV1/magento/index.php(40): Mage::run()
#16 {main}
 
Magento Community Magento Community
Magento Community
Magento Community
 
PacificDisc
Jr. Member
 
Total Posts:  17
Joined:  2009-02-25
 

Seems that several of us have had this issue and yet there are no fixes posted - that I’ve found so far.

To recap (and to echo what JoeNMass has reported), a store can be working fine for months and months, when suddenly you start getting calls saying the front end store cannot be accessed. Instead of the store, your customers are faced with a wall of code starting with:

SQLSTATE[42000]: Syntax error or access violation: 1142 INSERT command denied to user ......

Obviously this is a MAJOR problem, even if only a handful of folks get it, so why isn’t a fix documented anywhere? Indeed, if you Google this syntax error, you’ll come across other poor soul’s stores that have the same problem.

The other inform I’ve gleaned so far is that the SQL DB containing the Magento store (products, customer info etc) has suddenly become 150MB overnight. My store was working fine until this morning. It’s only got about 40 products and has about 400 orders since we switched it on 2.5 months ago. So why is the database suddenly so big and what can you do to fix AND prevent the same thing from happening again?

Any help would be greatly appreciated - especially from someone at Magento.

Thanks

- Sean

 
Magento Community Magento Community
Magento Community
Magento Community
 
PacificDisc
Jr. Member
 
Total Posts:  17
Joined:  2009-02-25
 

OK. Figured out that the SQL database that contains the Magento store will bloat over time to the point where the database exceeds many hosts limits. In my case it was 150MB, when the limit is 100MB (we use 1and1 hosting).

By going into “phpMyAdmin” - or whatever admin tool your host gives you and looking at your DB, you will see these files:

log_customer
log_quote
log_summary
log_summary_type
log_url
log_url_info
log_visitor
log_visitor_info

Go in and empty, or truncate each one of these files to flush out the stored data. If you need the data, obviously export first. But, by cleaning out these files, your database will shrink back down to size - in my case from 150MB to 24MB.

A quick refresh of the Magento cache (System/Cache Management), your store should return and the error will go away.

Hope this helps someone. Good luck

- Sean

 
Magento Community Magento Community
Magento Community
Magento Community
 
CT Schubert
Sr. Member
 
Avatar
Total Posts:  197
Joined:  2008-10-08
Southern California
 

This is a good reason to configure your admin settings to clean the logs every week or so

In admin area:

System -> Configuration -> Advanced -> System -> Log Cleaning

 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Happened to me too.  It seems that the scheduled log cleaning does not really work...but by truncating all the log entires as described above by PacificDisc worked wonders. Refresh the cache after that and wait a couple of mins. Works great!

Many many thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
paul_tj
Jr. Member
 
Total Posts:  4
Joined:  2011-06-28
 

My problem is exactly the same as JoeNMass however truncating those log files and deleting the cache hasn’t fixed my problem.  I get the error for ‘log_visitor’ when I visit the site and ‘log_admin’ when I try and login to the back end.  My database is only about 15MB in size after truncating tables.  Any ideas?  I’ve only been getting the error after I imported a lot of products into the database (which I have now deleted in effort to see if it fixed the problem).

 
Magento Community Magento Community
Magento Community
Magento Community
 
headros
Member
 
Avatar
Total Posts:  54
Joined:  2010-05-28
 

Are you using a shared host account?  If so, thats probably your problem, shared hosts and magento = sql lost errors and other random server not found errors.

 
Magento Community Magento Community
Magento Community
Magento Community
 
paul_tj
Jr. Member
 
Total Posts:  4
Joined:  2011-06-28
 
headros - 08 August 2011 04:07 AM

Are you using a shared host account?

Yes I am using shared hosting, with 123-reg.co.uk.  I’m new to all this - is shared hosting, hosting that is not on a dedicated server?

 
Magento Community Magento Community
Magento Community
Magento Community
 
headros
Member
 
Avatar
Total Posts:  54
Joined:  2010-05-28
 
paul_tj - 08 August 2011 04:14 AM

headros - 08 August 2011 04:07 AM
Are you using a shared host account?

Yes I am using shared hosting, with 123-reg.co.uk.  I’m new to all this - is shared hosting, hosting that is not on a dedicated server?

Magento’s db design and MVC model needs a dedicated server.  Too much server-side action for shared hosts.

You basically need to be an IT guru to manage a dedicated virtual svr (vps) or have a clever mind to assist, but the benefits are 1-2 second pageload times instead of 15-20 sec on shared ghosts accounts

My host, MediaTemple.com has techs familiar with Magento and have the skills to assist in migrating to vps.  Get a VPS with at least 2GIG RAM

 
Magento Community Magento Community
Magento Community
Magento Community
 
paul_tj
Jr. Member
 
Total Posts:  4
Joined:  2011-06-28
 

You basically need to be an IT guru to manage a dedicated virtual svr (vps) or have a clever mind to assist, but the benefits are 1-2 second pageload times instead of 15-20 sec on shared ghosts accounts

My host, MediaTemple.com has techs familiar with Magento and have the skills to assist in migrating to vps.  Get a VPS with at least 2GIG RAM

Cheers - I will definitely look to migrate to dedicated server once the site is up and running.  123-reg fixed the problem - I exceeded the database 150MB limit so they blocked it.  I’m gonna have to keep that database flushed…

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top