Jump to content

tables crashed


keat

Recommended Posts

One day last week, I found CubeCart_customer table had crashed, I thought not much of it, repaired it and got on with my day.

Then a few days later, I found that the inventory table had crashed, however, only 15 minutes earlier i'd modified SQL to lower the 'Full Text' searching limitation, so again, I thought not much of it. Maybe the SQL restart caused the crash.

 

However, this morning, I've come in to work to find this in my backup logs.

Table './xxxx/CubeCart_customer' is marked as crashed and should be repaired when using LOCK TABLES

 

Looking in PHPAdmin, the table doesn't appear crashed, so this may have resolved of it's own accord, but i'd be interested to learn why this has happened.

Any ideas ?

Link to comment
Share on other sites

Crashed tables in MySQL are almost always due to the MySQL server being stopped incorrectly (i.e. Not shutdown / restarted correctly) and if a transaction was in the middle of being written - somaybe the data was written / updated and the index wasn't.

You should check your server and MySQL logs (if it's your own server and contact your hosting company if it isn't) as this in theory should not happen

Ian

Link to comment
Share on other sites

Looking in the MySql logs, I find this.

 

UPDATE `CubeCart_customer` SET `customer_id` = '8868',`email` = '[email protected]',`password` = '0c8d0f003358ea47f004a379c052952c6adb8445cd2e1a0d3e2db876946d7999b19e4330e9e65fbdc74352bf06afa83ea645fbc21a57cbb7d3594283e956974d',`title` = 'Mr',`first_name` = 'Jason',`last_name` = 'Hughes',`country` = '826',`phone` = 'x',`mobile` = '',`registered` = 'x',`ip_address` = '80.42.xx.xx',`order_count` = '2',`type` = '1',`mailName` = '',`company_name` = '',`salt` = '69628e5d',`status` = '1',`language` = 'en-GB',`verify` = '',`new_password` = '1'  WHERE CubeCart_customer.customer_id = '8868'
170330 19:35:57 [ERROR] /usr/sbin/mysqld: Incorrect key file for table './XXX_ccv6/CubeCart_customer.MYI'; try to repair it
170330 19:35:57 [ERROR] /usr/sbin/mysqld: Incorrect key file for table './XXX_ccv6/CubeCart_customer.MYI'; try to repair it

170330 19:35:57 [ERROR] Got an error from thread_id=41825, /home/rpmbuild/rpm-build/BUILD/mysql-5.5.54/mysql-5.5.54/storage/myisam/mi_update.c:226

170330 19:35:57 [ERROR] MySQL thread id 41825, OS thread handle 0x7fbe1c134700, query id 4093868 localhost XXX_ccv6 Updating
UPDATE `CubeCart_customer` SET `customer_id` = '8868',`email` = '[email protected]',`password` = '0c8d0f003358ea47f004a379c052952c6adb8445cd2e1a0d3e2db876946d7999b19e4330e9e65fbdc74352bf06afa83ea645fbc21a57cbb7d3594283e956974d',`title` = 'Mr',`first_name` = 'Jason',`last_name` = 'Hughes',`country` = '826',`phone` = 'x',`mobile` = '',`registered` = 'x6',`ip_address` = '80.42.xx.xx',`order_count` = '2',`type` = '1',`mailName` = '',`company_name` = '',`salt` = '69628e5d',`status` = '1',`language` = 'en-GB',`verify` = '',`new_password` = '1'  WHERE CubeCart_customer.customer_id = '8868'

170330 20:30:01 [ERROR] Invalid (old?) table or database name '.ssh'
170330 20:34:21 [ERROR] /usr/sbin/mysqld: Table './cart_ccv6/CubeCart_customer' is marked as crashed and should be repaired

 

I can see from the database that customer_id 8868 is in fact this user, I assume that he tried or someone else has tried to update his details. However, the email address in the cart is not contactmejh@, so I'm not sure if the change was successful, or a failure.

A large number of crashed messages appear beyond this point up until about 4am this morning.

P.S, could a mod please obfuscate my database name (seeing as edit is no longer availabe)

Link to comment
Share on other sites

this will almost certainly be a server memory fault as the "key file" is the index on the table, which is typically stored in the DB memory for rapid reads. You realllllllllllllllllllly need your hosting provider to health check your server...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...