Register  |  Sign In
View unanswered posts | View active topics It is currently Thu Jun 26, 2025 11:56 am



Reply to topic  [ 22 posts ] 
 DB Issue 
Author Message
Site Owner
User avatar

Joined: Wed Sep 15, 2004 1:09 pm
Posts: 14631
Location: Pittsburgh
Post DB Issue
What a mess!

Should be fixed now ... basically the posts table and it's 1.5 million records crashed, had an index error and wasn't recovering properly. Spent all yesterday working on it and a process I ran overnight seems to have fixed it, thank goodness.

Sorry for the downtime.

_________________
Image


Fri Aug 28, 2009 6:24 am
Profile WWW
Z
User avatar

Joined: Sat May 13, 2006 2:20 pm
Posts: 7952
Location: Wherever he went, including here, it was against his better judgment.
Post Re: DB Issue
Did torrino bring you coffee?

_________________
"Der Lebenslauf des Menschen besteht darin, dass er, von der Hoffnung genarrt, dem Tod in die Arme tanzt."
- Arthur Schopenhauer


Fri Aug 28, 2009 6:50 am
Profile WWW
Extraordinary

Joined: Sat Oct 30, 2004 1:13 pm
Posts: 15197
Location: Planet Xatar
Post Re: DB Issue
Sounds like sabotage. I wonder who has sufficient admin privileges to pull such a stunt...


Fri Aug 28, 2009 8:11 am
Profile
Site Owner
User avatar

Joined: Wed Sep 15, 2004 1:09 pm
Posts: 14631
Location: Pittsburgh
Post Re: DB Issue
Nah, nothing like that. Looks like the DB crashed partly through an insert, and because the record was partly inserted, indexes were out of wack and everything went bonkers.

_________________
Image


Fri Aug 28, 2009 8:17 am
Profile WWW
Extraordinary
User avatar

Joined: Fri Nov 11, 2005 9:51 pm
Posts: 11637
Post Re: DB Issue
That really sucks, I really appreciate your work. I am sorry you had to spend so much time fixing it though.


Fri Aug 28, 2009 9:37 am
Profile WWW
Forum General
User avatar

Joined: Sat Dec 18, 2004 2:27 pm
Posts: 6152
Location: New York
Post Re: DB Issue
Thanks for all your work to fix it!


Fri Aug 28, 2009 10:22 am
Profile
Extraordinary
User avatar

Joined: Tue Oct 12, 2004 11:24 pm
Posts: 16061
Location: The Damage Control Table
Post Re: DB Issue
Eagle wrote:
Nah, nothing like that. Looks like the DB crashed partly through an insert, and because the record was partly inserted, indexes were out of wack and everything went bonkers.


What the hell does that even mean? :blink:

Thanks for all the (unexpected) hours of working through partially inserted indexes and whatnot.


Fri Aug 28, 2009 10:53 am
Profile
Site Owner
User avatar

Joined: Wed Sep 15, 2004 1:09 pm
Posts: 14631
Location: Pittsburgh
Post Re: DB Issue
Heh, I'll try and explain better for anyone interested ... basically ... each post has a unique number:

Post 1, Post 2, Post 3, etc. When someone makes a post, the database will automatically give that post the next unique number. Unfortunatly, something happened in the middle of an insert, meaning a record was entered into the database as Post 4, but the database got amnesia and doesn't remember inserting it. Well, the next time someone tried to post, the database again tried to insert the new post as Post 4 and was like "Hey, who the hell are you! There's not supposed to be a Post 4 here!"

That's the basic issue, and fixing that issue isn't as simple as you'd expect. Each time a post is made, the posts table is LOCKED temporarily, and UNLOCKED when the insert completes. Well, since it never finished inserting correctly, the table remained LOCKED, which causes all kinds of headaches. All attempts to unlock the table resulted in the fail whale.

The only way to fix these two problems is a series of repairs on the database, but because the table is so huge (~1.5 million records), attempts to repair it were causing the HTTP service to crash. To get around that, I had to run the repair via command line, but part of the repair process is to build a temporary index file which was too big for the directory it builds in. Meaning it ran out of space and couldn't fully rebuild the database. To give the specific partition more space, I'd have to reformat the entire server, and I didn't want to do that. So I then decided to rebuild the index in memory, which was very SLOW, but seemed to be working. Unfortunatly, when that process finished, it threw an error saying the database was still marked as crashed, and rebuilding the index wasn't sufficient to repair it. Yeesh!!!

So I had to rebuild not only the table indexes, but also the file holding all the data of the database. I kicked that process off before bed, it finished early this morning. Ta Da!

Bet you wish you hadn't asked, heh.

_________________
Image


Fri Aug 28, 2009 11:12 am
Profile WWW
College Boy T

Joined: Mon Oct 11, 2004 7:52 pm
Posts: 16020
Post Re: DB Issue
Thanks Karl-izzle!


Fri Aug 28, 2009 11:13 am
Profile
We had our time together
User avatar

Joined: Thu Oct 21, 2004 4:36 am
Posts: 13299
Location: Vienna
Post Re: DB Issue
Thanks, Eagle :)


Fri Aug 28, 2009 11:14 am
Profile WWW
Romosexual!
User avatar

Joined: Tue Oct 19, 2004 3:06 am
Posts: 32607
Location: the last free city
Post Re: DB Issue
Thx Karl :D
I luv this place n don't ever want it to die.

_________________
Is it 2028 yet?


Fri Aug 28, 2009 11:40 am
Profile
Sbil

Joined: Tue Oct 12, 2004 3:38 pm
Posts: 48678
Location: Arlington, VA
Post Re: DB Issue
Yay it's back


Fri Aug 28, 2009 11:48 am
Profile
Extraordinary
User avatar

Joined: Sat Oct 16, 2004 12:52 am
Posts: 25990
Post Re: DB Issue
Thanks for your hard work fixing this Eagle!

_________________
In order of preference: Christian, Argos

MadGez wrote:
Briefs. Am used to them and boxers can get me in trouble it seems. Too much room and maybe the silkiness have created more than one awkward situation.


My Box-Office Blog: http://boxofficetracker.blogspot.com/


Fri Aug 28, 2009 12:29 pm
Profile WWW
Superfreak
User avatar

Joined: Sat Aug 20, 2005 12:54 am
Posts: 22197
Location: Places
Post Re: DB Issue
Thanks brosef

_________________
Ari Emmanuel wrote:
I'd rather marry lindsay Lohan than represent Mel Gibson.


Fri Aug 28, 2009 12:32 pm
Profile
Confessing on a Dance Floor
User avatar

Joined: Tue Nov 23, 2004 12:46 am
Posts: 5578
Location: Celebratin' in Chitown
Post Re: DB Issue
Muchas gracias! I missed my KJ lurking yesterday and with all the threads about the site disappearing I was a bit worried. great that it's back up.


Fri Aug 28, 2009 12:48 pm
Profile
We had our time together
User avatar

Joined: Thu Oct 21, 2004 4:36 am
Posts: 13299
Location: Vienna
Post Re: DB Issue
Yeah I thought it's over now, I'm really glad it's not.


Fri Aug 28, 2009 12:55 pm
Profile WWW
Top Poster
User avatar

Joined: Sun Oct 17, 2004 1:01 am
Posts: 5264
Location: Wakanda
Post Re: DB Issue
Thanks Eagle! No matter how much guff you get sometimes from certain posters, I've always admired your hard work.


Fri Aug 28, 2009 1:35 pm
Profile
We had our time together
User avatar

Joined: Thu Oct 21, 2004 4:36 am
Posts: 13299
Location: Vienna
Post Re: DB Issue
Passionate Thug wrote:
Thanks Eagle! No matter how much guff you get sometimes from certain posters, I've always admired your hard work.


Seconded.


Fri Aug 28, 2009 2:13 pm
Profile WWW
problem?

Joined: Tue Oct 19, 2004 6:52 am
Posts: 15515
Location: Bait Shop
Post Re: DB Issue
All lies. The truth of August 26th has been documented and made public knowledge.

viewtopic.php?f=10&t=53274

Never forget.

_________________
Image


Fri Aug 28, 2009 3:29 pm
Profile
You must have big rats
User avatar

Joined: Sat Oct 16, 2004 4:28 pm
Posts: 92093
Location: Bonn, Germany
Post Re: DB Issue
Yeah, Karl, thanks a lot!

_________________
The greatest thing on earth is to love and to be loved in return!

Image


Fri Aug 28, 2009 9:45 pm
Profile WWW
Z
User avatar

Joined: Sat May 13, 2006 2:20 pm
Posts: 7952
Location: Wherever he went, including here, it was against his better judgment.
Post Re: DB Issue
Thank you very much, Eagle. I will dedicate my first daughter to you.

_________________
"Der Lebenslauf des Menschen besteht darin, dass er, von der Hoffnung genarrt, dem Tod in die Arme tanzt."
- Arthur Schopenhauer


Sat Aug 29, 2009 2:37 am
Profile WWW
The Greatest Avenger EVER
User avatar

Joined: Fri Oct 29, 2004 4:02 am
Posts: 18501
Post Re: DB Issue
Eagle wrote:
What a mess!

Should be fixed now ... basically the posts table and it's 1.5 million records crashed, had an index error and wasn't recovering properly. Spent all yesterday working on it and a process I ran overnight seems to have fixed it, thank goodness.

Sorry for the downtime.


Hmmm.. Must've crashed from the AVATAR trailer Premiere and it's overwhelming popularity.. :ninja:


Sat Aug 29, 2009 9:33 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 22 posts ] 

Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.