Hi,
I had an 4.4.2 site outage this morning with the following error:
Fatal error: Can't open file: 'sessions.MYD'. (errno: 145) query: SELECT u.*, s.*, r.name AS role FROM users u INNER JOIN sessions s ON u.uid = s.uid LEFT JOIN role r ON u.rid = r.rid WHERE s.sid = 'e9cc93bab76197fbf51609636250a9f8' AND u.status < 3 LIMIT 0, 1 in /home/httpd/vhosts/mydomain.ca/httpdocs/includes/database.mysql.inc on line 97
The site was moved to a different directory and database location (same Apache/PHP/MySQL host) last week and was running fine over the weekend.
When I checked with phpMyAdmin, it was unable to open the sessions table, so I dropped and recreated it and then everything was fine. My questions:
1) Could moving a Drupal installation, including the database with sessions table and other data, cause this? Should some data not be moved - only the table structure?
2) Should I be concerned about other possible errors in the database?
Thanks in advance.
-- Ken
Chase two rabbits, catch none. - Japanese proverb
It just sounds like something went wrong in the move. Next time, try repairing the table instead of dropping/recreating it. Use "REPAIR TABLE tablename".
Steven Wittens
Thanks Steven. I was unable to view the sessions table with phpMyAdmin 2.2.6 (MySQL 3.23.58), so I could't access the "Repair" link and didn't know the proper syntax. Plus there was panic :-) Luckily it wasn't the node table.
On Mar 15, 2005, at 8:52 PM, Steven Wittens wrote:
It just sounds like something went wrong in the move. Next time, try repairing the table instead of dropping/recreating it. Use "REPAIR TABLE tablename".
Steven Wittens
-- Ken
We don't see things as they are, we see things as we are. - Anais Nin
On 15 Mar 2005, at 15:43, Ken Dow wrote:
Fatal error: Can't open file: 'sessions.MYD'. (errno: 145) query: SELECT u.*, s.*, r.name AS role FROM users u INNER JOIN sessions s ON u.uid = s.uid LEFT JOIN role r ON u.rid = r.rid WHERE s.sid = 'e9cc93bab76197fbf51609636250a9f8' AND u.status < 3 LIMIT 0, 1 in /home/httpd/vhosts/mydomain.ca/httpdocs/includes/database.mysql.inc on line 97
Most of the time this is caused by a harddisk (partition) running out of disk space/quota. This could have corrupted any table and may cause data loss.
-- Dries Buytaert :: http://www.buytaert.net/
Ah! That's exactly what happened. I hadn't changed the default settings for the target site prior to the move, and there was a disk quota exceeded error shortly afterward. I corrected it right away, but obviously not soon enough. Thanks - that's good to know. I'll check the remaining tables for problems.
On Mar 17, 2005, at 12:49 PM, Dries Buytaert wrote:
On 15 Mar 2005, at 15:43, Ken Dow wrote:
Fatal error: Can't open file: 'sessions.MYD'. (errno: 145) query: SELECT u.*, s.*, r.name AS role FROM users u INNER JOIN sessions s ON u.uid = s.uid LEFT JOIN role r ON u.rid = r.rid WHERE s.sid = 'e9cc93bab76197fbf51609636250a9f8' AND u.status < 3 LIMIT 0, 1 in /home/httpd/vhosts/mydomain.ca/httpdocs/includes/database.mysql.inc on line 97
Most of the time this is caused by a harddisk (partition) running out of disk space/quota. This could have corrupted any table and may cause data loss.
-- Ken
Nobody is smart enough to be wrong all the time. - Ken Wilber