amariotti.com

  • about
  • blog
  • modules
  • portfolio
  • resumé
  • contact
Home › Blogs › amariotti's blog

Recent blog posts

  • Moving to tumblr
  • Happy 10th Birthday, Drupal!
  • Why I'm so excited about Rule.fm!
  • Reverse NodeReference Block - Revisited
  • CS4 Keyboard Issues
  • Text Formatter Module
  • Cool Apache ReWrite Trick
  • New RSS Feed
  • Find My iPhone
  • Congratulations, Drupal!
more

Blog tags

cck design drupal drupal 6 drupal issue liquidweb module modules that I love os x random task management views
more tags

A Tuesday Morning Scare [UPDATED]

amariotti — Tue, 10/21/2008 - 13:11

I came in this morning to find that our Main College Website wasn't accepting logins to the site. When I would try to login it would redirect me to the page it was supposed to but not log me in so that I could have access to the admin stuff. Since I couldn't login I didn't have access to any of the Watchdog log to see where the issue is coming from. I immediately went to forums to see what I could find.

I found a couple of discussions about it, most of which were all related to the 'sessions' table in the database. Then I found another discussion that recommended checking the Watchdog log through the 'watchdog' table in the database. So that's where I went next. This is what I found:

Table './drupal_root/sessions' is marked as crashed and should be repaired query: INSERT INTO sessions (sid, uid, cache, hostname, session, timestamp) VALUES ('vin7iahr7127bvp921', 0, 0, '205.122.22.xxx', '', 1224601392) in /htdocs/drupal_root/includes/database.mysql.inc on line 174.

There was my answer. The 'sessions' table was corrupted and needed to be repaired. So I logged into my phpMyAdmin and crossed my fingers as I selected the "Repair table" dropdown at the bottom of the page. It worked!

It all made sense once I found out the issue was with the 'sessions' table. No one could login and open a "session" on the website. Why didn't I think of that? Oh well. Now I know what happened, and I know what to do to fix it. The question is, "How did it happen?"

UPDATE: One thing to note here along with this issue is the fact that we are using the LDAP module to authenticate to our servers. Another issue that we ran into was with some permissions that had changed on our LDAP server for anonymous searches. This was easily fixed by creating an account that was granted access to perform searches on the site. My guess is that someone was logged in while the permission were changed and it corrupted the sessions table. It also could have been someone logging in while the permissions were changed, but the chances of that are pretty unlikely.

UPDATE 2 [3/3/2009]: I came into work today to find the same thing had happened. Something usually has to happen twice before I actually look into a solution for the problem. This was no exception :). So after repairing the database again, along with another one, I found a module called session_expire that will clean out your sessions table on a regular basis. You determine the frequency, and your off and running!

  • drupal
  • drupal issue
  • amariotti's blog
  • 1771 reads
  • about
  • blog
  • modules
  • portfolio
  • resumé
  • contact