jos_session is marked as crashed and should be repaired

Need help installing Joomla!? For all Joomla! installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
Tintu_89
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jul 19, 2012 9:08 am

jos_session is marked as crashed and should be repaired

Post by Tintu_89 » Thu Jul 19, 2012 9:22 am

why this error happens? how can i solve this permanently?..

plzz help me..

Thanks..

User avatar
micheas
Joomla! Explorer
Joomla! Explorer
Posts: 323
Joined: Sat Sep 03, 2005 10:54 am
Location: San Francisco, CA
Contact:

Re: jos_session is marked as crashed and should be repaired

Post by micheas » Mon Jul 23, 2012 9:57 pm

The problem: mysql crashed, had the power pulled, etc, while it was writing a cookies session data to jos_session.

The immediate solution: go to your mysql admin program (phpmyadmin, or open mysql on the command line) and run the following command:

Code: Select all

repair table jos_session;
Possible permanent solutions:
move the database to a server that won't go down unexpectedly (the best and most expensive solution)

write a script that checks if the tables are crashed and try and auto repair them if so.

move the session cookies from the database to the file system. (less secure, does not scale as well, gives better performance for small sites however.)

seoras
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Thu Aug 12, 2010 12:47 pm

Re: jos_session is marked as crashed and should be repaired

Post by seoras » Thu Nov 01, 2012 11:31 am

This has started happening to my web site.
It's not a power outage that causing it.

This I'm sure of because I left 3 ssh sessions connected to the server from my Mac and the problem happened again last night.
All 3 sessions are still running so safe to assume no restart/reboot

It's happened twice now in 2 weeks and the first time it happened was when my site got a (brief) jump in Google ranking and doubled it's normal traffic load.

Any suggestions?

Is this a joomla bug or an SQL bug?

Joomla 1.5.15
PHP 5.2.6-1+lenny16
MySQL 5.0.51a-24+lenny5

Codeless
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Tue Oct 06, 2009 4:36 am

Re: jos_session is marked as crashed and should be repaired

Post by Codeless » Mon Feb 17, 2014 11:38 pm

Having the same problem here with one of the sites, whenever my server crashes or needs to restart it throws up this error. Repairing the table works great. But I need to find a way to prevent this from happening. Of course not having the server crash is step number 1, which I've upgraded it's hardware in hopes that won't happen anymore. But its strange that only one of my sites gives this error (the one with the highest traffic) when the sever restarts. Other Joomla 2.5 and 3.0 sites on the same server don't give this error upon restart.

I have checked configuration.php and it does have my table's prefix in it.

My hosting company says I have to upgrade my PHP/SQL. But whenever I do that with Joomla always some extension stops working, so I'm trying to remain on my current PHP version (PHP 5.3.28). And I don't think upgrading will really fix anything.

I've done a lot of research and it's quite the popular Joomla error without any definitive solution. Hopefully a few of us can put our heads together and solve this problem once and for all.

Cheers!

PS - does anyone know a way to set a cron task or something to automatically repair the table so if it does go down again it'll be automatically fixed? Or is that also dangerous behavior?

User avatar
micheas
Joomla! Explorer
Joomla! Explorer
Posts: 323
Joined: Sat Sep 03, 2005 10:54 am
Location: San Francisco, CA
Contact:

Re: jos_session is marked as crashed and should be repaired

Post by micheas » Tue Feb 18, 2014 12:02 am

The way to prevent this is to configure Joomla to store sessions in the file system instead of the database.

Codeless
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Tue Oct 06, 2009 4:36 am

Re: jos_session is marked as crashed and should be repaired

Post by Codeless » Tue Feb 18, 2014 7:22 am

Thanks for your help micheas. How would one accomplish this? And as you said before, it's less secure, does not scale as well, gives better performance for small sites however... my site is very large, so not sure about this as a solution...


Locked

Return to “Installation - 1.0.x”