Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 06:32 pm EST

Geeklog Forums

Site crashed with SQL session error


Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
A huge embarrassment was caused to me when a client informed me their site (v1.5.0) has been disabled for days now. It turned out Geeklog displayed a SQL error, so I took a look in error.log.

error.log was filled with only 2 lines that kept repeating themselves (mostly the first line. The second was more rare):
Text Formatted Code

126: Incorrect key file for table './geeklog/gl_sessions.MYI'; try to repair it. SQL in question: DELETE FROM gl_sessions WHERE start_time < (timestamp goes here)
1194: Table 'gl_sessions' is marked as crashed and should be repaired. SQL in question: DELETE FROM gl_sessions WHERE remote_ip = '(IP address goes here)' AND uid = 1
 

Before the first occurance of these lines, there was nothing special.

Having no other idea in mind, I tried to optimize the whole database. The site was still disabled. I entered gl_sessions specifically and chose to optimize it. Hundreds of lines were cut to just dozens. I re-entered the site, which finally worked but also caused the table to be emptied (as if Geeklog ran the "empty" command). So it seems everything is fine again, but how do I make sure it won't happen again?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
A basic troubleshooting tip, if I may: When you get an error message - try reading it. Specifically the advise contained therein: "Table 'gl_sessions' is marked as crashed and should be repaired."
Text Formatted Code
REPAIR TABLE gl_sessions;

And you're back in business.

And for more information, you may want to try a search on the forums ...

bye, Dirk
 Quote

All times are EST. The time is now 06:32 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content