kjtocool Posted August 27, 2009 Share Posted August 27, 2009 I have a large phpbb forum, the phpbb_posts table crashed late last night. When I run a check on the table, I get: worldofk_phpbb3.phpbb_posts check warning Table is marked as crashed and last repair failed worldofk_phpbb3.phpbb_posts check warning 1 client is using or hasn't closed the table prope... worldofk_phpbb3.phpbb_posts check warning Size of indexfile is: 1847600128 Should be: 1... worldofk_phpbb3.phpbb_posts check warning Size of datafile is: 858198988 Should be: 84... worldofk_phpbb3.phpbb_posts check error Found 1469781 keys of 1084641 worldofk_phpbb3.phpbb_posts check error Corrupt Any attempt to repair the table causes Apache (httpd) to crash. Executing "Unlock Tables" executes successfully, but does not clear the lock on phpbb_posts. Restarting the MYSQL service does not clear the lock. Restarting the server did not clear the lock. I'm out of ideas, any help is greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/172117-table-locked-table-crashed-help/ Share on other sites More sharing options...
JonnoTheDev Posted August 27, 2009 Share Posted August 27, 2009 Please say you have a backup Quote Link to comment https://forums.phpfreaks.com/topic/172117-table-locked-table-crashed-help/#findComment-907677 Share on other sites More sharing options...
kjtocool Posted August 27, 2009 Author Share Posted August 27, 2009 I do, but not as recent as I'd like. I'd lose about 100,000 records worth of data. I don't think it's that bad however. Even though the table is locked, I think I still have read access and should be able to make a full dump of the DB if need be. The issue seems to be an insert statement that hung, locked the table, and now the keys are all messed up. I've decided to try repairing the table via command line, unfortunatly the command "myisamchk --recover --quick phpbb_posts.MYI" can't be used because it fills up the /tmp directory to 100% capacity then hangs as it waits for more space. As far as I know, the only way to grant that directory more space would be to reformat, ugh. I'm trying instead to repair the table via command line using "myisamchk --safe-recover --quick phpbb_posts.MYI" which uses memory rather than the tmp directory. Unfortunatly it's also incredibly slow, so I'm waiting as it runs, hopefully if it completes my issue will be fixed. Quote Link to comment https://forums.phpfreaks.com/topic/172117-table-locked-table-crashed-help/#findComment-907687 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.