The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 18, 2019, 07:51:45 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: mySQL crashed table question  (Read 2394 times)
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 994



View Profile WWW
« on: April 21, 2010, 11:03:46 AM »

Hey guys

I had a table in one of my DBs that decided it wanted to be crashed.  It's about 700k rows and 2GB.  So, i started a repair on the table and let it run for HOURS to no avail.  I rebooted the machine and started it over after the repair didn't finish in liek 15 hours.

I'm wondering if there is another route i can take to fix this table and if not, how long should a repair on a table this size take?

Logged

We can't stop here, this is bat country.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #1 on: April 21, 2010, 12:11:48 PM »

Can you stop everything from talking to that database? Transactions will make repair take longer. Bascially everything makes it take longer. Even wanting it to go faster...

2gb should not take THAT long though. I think my last repair was 5 hours and was on 30 million rows at 80gb. Something like that.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 994



View Profile WWW
« Reply #2 on: April 21, 2010, 12:23:24 PM »

Since posting this i have found what may be the problem.  the /tmp/ partition on the server was 996MB and was totally full.  I tried running myisamchk -r and it was failing after a couple hundred thousand rows.

i changed the tmpdir variable in mysql to a partition with tons of space and it's running just ding dong dandy now.  ran through a couple different steps now its on Fixing Index 5YI where it's been for the last few minutes.

i'm thinking that this should do the trick.  If not, i'm going to probably have to burn down my neighborhood.
Logged

We can't stop here, this is bat country.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #3 on: April 21, 2010, 12:43:04 PM »

Funny i was just posting about disk space when you popped in ... MySQL is not that good at letting you know when that is the problem. Well done.

Please let the neighborhood be.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 994



View Profile WWW
« Reply #4 on: April 21, 2010, 01:01:47 PM »

son of a bitch fucking mysql - that was totally the problem.  I ran the myisamchk and it repaired everything in no time once i told it to use a new tmp folder that had enough space.

db is back online and lesson learned.  Thankfully for the neighborhood, i got a phone call while i was gathering arson supplies and by the time i was off the phone the table was repaired.

divine intervention maybe.
Logged

We can't stop here, this is bat country.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!