1

My magento websites are hosted on Heartinternet who suffered a power meltdown to their servers last week and everything shut down unexpectedly creating further chaos. After everything was back, even after trying repair database and performing a few others things, I still receive the following error and my the store is unavailable:

SQLSTATE[HY000]: General error: 1030 Got error -1 from storage engine, query was: INSERT INTO `log_visitor` 

Even when I go and try insert a new row myself, still receiev this -1 error from storage engine and couldn't find anywhere a proper way to fix it.

Thanks in advance for anyone contributing.

1

My fine guess is that your database storage is full.

Check the size of your database, and especially the log tables as it seems like the query is related to log_visitor table, it's one of those tables that can get very big over time if you don't empty them.

Magento comes with a useful shell script to clean the logs:

php -f shell/log.php -- clean

Once you're done I suggest you setup the Magento automatic log cleanup under System > Configuration > Advanced > System > Log Cleaning so you won't have to deal with such problem anymore.

  • Thank you very much for your response mate, well I agree with you but how am suppose to free some space since I receive the same error -1 even when I try to delete some rows? – Artemis Chaitidis Feb 16 '16 at 15:47
  • See my edited answer – Raphael at Digital Pianism Feb 16 '16 at 15:52
  • @RiccardoT Thank you all for your replies, although this didn't help. Executing the shell script still prompt the error even there, while using the TRUNCATE command did clean the tables, but still the error is getting generated. Any other ideas? – Artemis Chaitidis Feb 17 '16 at 12:39
  • Did you try flushing cache and session after doing it ? – Raphael at Digital Pianism Feb 17 '16 at 12:55
  • Yup I did, but I found something else as well, mysql won't start unless there is innodb_force_recovery on my.cnf of at least value of 1 or greater. – Artemis Chaitidis Feb 17 '16 at 13:53
1

You are probably running out of space on your MySQL partition. Clean log by truncating log tables:

  TRUNCATE dataflow_batch_export;
  TRUNCATE dataflow_batch_import;
  TRUNCATE log_customer;
  TRUNCATE log_quote;
  TRUNCATE log_summary;
  TRUNCATE log_summary_type;
  TRUNCATE log_url;
  TRUNCATE log_url_info;
  TRUNCATE log_visitor;
  TRUNCATE log_visitor_info;
  TRUNCATE log_visitor_online;
  TRUNCATE report_viewed_product_index;
  TRUNCATE report_compared_product_index;
  TRUNCATE report_event;
  TRUNCATE index_event;

Make sure you configured your MySQL with "file-per-table" option too to avoid uncontrolled growth of innodb files.

  • You can also do it via backend: System > Configuration > Advanced > System > Log Cleaning – Phoenix128_RiccardoT Feb 16 '16 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.