How do I fix this error?

How do I fix the following error using trustix Linux:

Fatal error: Can't open file: 'sessions.MYI'. (errno: 145) query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = '75185a7ef66c9ff13b8d8b4f50dd7e4b' AND u.status < 3 LIMIT 0, 1 in /home/httpd/html/includes/database.mysql.inc on line 66

Same sessions.MYI error...

pnelson - September 17, 2005 - 20:28

Fatal error: Can't open file: 'sessions.MYI'. (errno: 145) query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = '9cfc9952904233d7b9ba8f8b98273d6e' AND u.status < 3 LIMIT 0, 1 in /home/pnelson/public_html/k12edcom/includes/database.mysql.inc on line 66

This is what I'm getting from three different drupal sites served from my host. Any clues?

Join the Club

qolspony - September 20, 2005 - 00:47

Fatal error: Table 'qolspon_bmarkf.users' doesn't exist query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = '27ccc4cf0dda3220ae7a00105218c1db' AND u.status < 3 LIMIT 0, 1 in /hsphere/local/home2/qolspony/brunsonmarketingforce.com/Drupa/includes/database.mysql.inc on line 66

I had a similar error

utna - September 24, 2005 - 22:23

my webpage went down, with no html response or timeout.

there were sever SQL process running the same query:

SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = '7bf64b151265f1453

i tried to kill them, but they persisted. Is this perhaps a cron related issue?

I deleted the database user, and recreated, and the site came back up fine.

some more info

utna - September 25, 2005 - 00:08

the logs function in drupal reported that the cron user had an error:

Lost connection to MySQL server during query query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid INNER JOIN users_roles ur ON ur.rid = r.rid WHERE ur.uid = 0 in

/home/... .../includes/database.mysql.inc on line 66.

This Worked For Me

rwreed - September 25, 2005 - 19:23

I got this answer from another thread (thanks cyberchucktx!)

Using PhpMyAdmin I rebuilt the sessions table with the following command:

REPAIR TABLE sessions QUICK;

Rebuilt the table in less than a second and all was well afterward.

Good Luck

Worked for me, too!

Geoff Sobering - October 21, 2005 - 03:17

Thanks... but...

lycros - November 21, 2005 - 15:56

Thanks for the info, but does anyone know WHY this happened? I'd rather cut off why it happened in the first place than just fix it everytime it happens.

(but again... thanks for the info on how to fix it.)

YES! - REPAIR TABLE sessions QUICK

snackmaster - December 19, 2005 - 05:30

Thank you rwreed!!!!!!!!!!! You saved me bigtime.

Now as to why this happens....
I manually ran "cron.php" via browser and all was good. I then set Cron to run cron.php once an hour through my GUI webadmin. Next time i check the site (3hrs later) it's dead. Why does this happen? did I set Cron wrong?

cron.php... Drupal comes with Search enabled by default and no explanation as to why it doesn't work. Once I track down why it doesn't work I end up taking my site offline. I would say cron/search needs a little love and care from the droopy team.

Worked for me too!

muyiwataiwo - October 1, 2006 - 12:48

Just to say thanks for this. You saved me big time!

But as someone asked, does anybody know why this happened to start with?

Cheers, and thanks again!

Muyiwa

Where do I enter this command in PHP Admin?

idrawcoolstuff - February 22, 2006 - 01:44

Sorry really new to database management. Where do I enter:

REPAIR TABLE sessions QUICK;

to fix?

MB

Got it. Never mind...

idrawcoolstuff - February 22, 2006 - 04:20

Found my answer on another thread. More simple than I thought

MB

Hmm..didn't work for me

charlener - March 1, 2006 - 03:38

cleared out sessions, repaired, and everything. I'm using the pubcookie module though, and ssl - could this be a factor?

Thanks,
charlene

 
 

Drupal is a registered trademark of Dries Buytaert.