table jos_session crashed, what is the cause?

This forum is for reporting bugs in Joomla!. Please don't report problems with extensions in here.
Locked
User avatar
markuz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 225
Joined: Tue Nov 08, 2005 6:43 pm
Location: the Netherlands
Contact:

table jos_session crashed, what is the cause?

Post by markuz » Wed Sep 15, 2010 8:30 am

Last night my site crashed due to a problem with jos_session. The site showed up with the message.
jtablesession::Store Failed
DB function failed with error number 145
Table './example/jos_session' is marked as crashed and should be repaired SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( 'hashcode_here','large_number_here','','0','1','0' )
I managed to repair it through a repair with this SQL-command:

Code: Select all

REPAIR TABLE `jos_session`
...But my question is: How could this happen? Is it a Joomla! bug? Is it a MySQL-bug? How can I prevent this?

Greetings,
Mark

jrbashi
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Dec 07, 2009 5:30 am

Re: table jos_session crashed, what is the cause?

Post by jrbashi » Tue Nov 15, 2011 6:54 am

I would also like to know how to prevent this. It's only happened twice to me in the 25+ sites I've built with Joomla in the past 3 years. But I would like to know if there is a way to prevent it.

cheers,
James

User avatar
ant
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 158
Joined: Sun Sep 18, 2005 1:22 pm
Location: Italy
Contact:

Re: table jos_session crashed, what is the cause?

Post by ant » Fri Nov 25, 2011 9:14 am

And I just add myself among the ones who would like to know how to prevent this crash.

I noticed in the past that this error occurred on high traffic sites on a budget hosting, but today I find a site of my clients that crashed on a hosting service which usually performs very well (and the site is not generating high traffic!).

So, what is the cause and how to prevent, if possible?
Thanks,
Ant.
Ant at Artimediali Web Design
Realizzazione siti web Joomla!
http://www.artimediali.net

User avatar
ant
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 158
Joined: Sun Sep 18, 2005 1:22 pm
Location: Italy
Contact:

Re: table jos_session crashed, what is the cause?

Post by ant » Fri Nov 25, 2011 10:23 am

Ok, I read enough. Someone in this forum tells it has to do with "the drive being mounted as read-only by the OS after a reboot" (actually my site crashed after a down of the server).

Someone also suggests a permanent solution: set session_handler to "none", instead of "database", in the configuration file. It should avoid jos_session table to crash and it makes sense to me.

Greetings,
Ant.
Ant at Artimediali Web Design
Realizzazione siti web Joomla!
http://www.artimediali.net

xyzbytes
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Thu Oct 26, 2006 4:15 pm

Re: table jos_session crashed, what is the cause?

Post by xyzbytes » Wed Dec 14, 2011 2:43 pm

I just had the same thing happen. It sounds like there is a bug.

Thetjo
Joomla! Explorer
Joomla! Explorer
Posts: 499
Joined: Fri Nov 13, 2009 1:33 pm
Contact:

Re: table jos_session crashed, what is the cause?

Post by Thetjo » Mon Jun 04, 2012 8:32 am

I know this topic is pretty old already and I'm sorry for the bump.

However, I just encountered this issue on a Joomla 1.5 website, and after some digging I found out that my session lifetime (in the Global Configuration) was set to 9999 minutes. Perhaps others with this issue are facing the same settings and I would suggest lowering that value drastically to reduce the chance of any problems with the sessions table.

Another alternative seems to be the one suggested by ant to move the session handling away from the database altogether, but somehow that seemed a bit more risky to me (knowing how most hosts are handling file permissions, etc.).
http://www.conversionreview.com/ - Start improving your conversion rate with an expert review

User avatar
ant
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 158
Joined: Sun Sep 18, 2005 1:22 pm
Location: Italy
Contact:

Re: table jos_session crashed, what is the cause?

Post by ant » Mon Jun 04, 2012 10:40 am

Hi Thetjo,
thank you for reporting your experience.
I just checked some of the sites that encountered this issue: they all have a session lifetime of 30 minutes. But I'll keep an eye in future to this setting ;)
Ant at Artimediali Web Design
Realizzazione siti web Joomla!
http://www.artimediali.net

xdrone
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Mar 12, 2007 7:04 pm

Re: table jos_session crashed, what is the cause?

Post by xdrone » Sun Jul 08, 2012 4:39 am

I am presently experiencing the same problem. My database over sixty GB of data and I need a solution since I am experiencing the same issue. Table jos_session crashes with the following report.
warning : Table is marked as crashed
warning : 3 clients are using or haven't closed the table properly
error : Record at pos: 346856 is not remove-marked
error : record delete-link-chain corrupted
error : Corrupt
Is this an optimization issue? Has any solution?

xdrone
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Mar 12, 2007 7:04 pm

Re: table jos_session crashed, what is the cause?

Post by xdrone » Sun Jul 08, 2012 4:59 am

I am presently experiencing the same problem. My database over sixty GB of data and I need a solution since I am experiencing the same issue. Table jos_session crashes with the following report.
warning : Table is marked as crashed
warning : 3 clients are using or haven't closed the table properly
error : Record at pos: 346856 is not remove-marked
error : record delete-link-chain corrupted
error : Corrupt
I reviewd the session table data and noticed empty session "data" columns.

Has any solution?

bussy
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Oct 24, 2011 7:51 pm

Re: table jos_session crashed, what is the cause?

Post by bussy » Tue Jul 17, 2012 2:24 pm

Thanks "code" REPAIR TABLE `jos_session` did it, but the question is still why it's happening?

whamprod
Joomla! Intern
Joomla! Intern
Posts: 69
Joined: Tue Jun 17, 2008 9:18 pm

Re: table jos_session crashed, what is the cause?

Post by whamprod » Thu Feb 07, 2013 7:16 pm

I have run into this exactly same issue on three of my client websites in just the past 5 days. All three sites were version 2.5.X.

My solution:
  1. open the database in question in phpMyAdmin.
    Image
  2. At the "home" screen, click on "databases" tab at the top.
    Image
  3. On the next screen, click on the name of the database.
    Image
  4. The list of tables and their structure will load into phpMyAdmin's main frame. Scroll down until you see the sessions table, and check it.
    Image
  5. Scroll the rest of the way down the page, and look for the "With Selected" pulldown menu at the bottom.
    Image
  6. Click the pulldown open and select "Repair table."
    Image
  7. phpMyAdmin will automatically process the request, repairing the table. When this is finished, you will see the following message at the top of the page:
    Image
  8. Your are finished, and the website should load just fine.
I have no idea of what might have caused three such crashes within days of one another on the same server, but when looked at my server logs, there was no indication of anything untoward going on. I spoke to my own php/mysql guru, he said that it was possible that someone was trying an sql injection or something, but without any server log indications, it would seem hard to tell what is going on. Everything on my server regarding linux, apache, php, and mysql is all up to date current versions.

In any case, you learn as you go forward. At least the fix was a simple one, and only takes about 30 seconds to do.

whamprod
Joomla! Intern
Joomla! Intern
Posts: 69
Joined: Tue Jun 17, 2008 9:18 pm

Re: table jos_session crashed, what is the cause?

Post by whamprod » Tue Feb 12, 2013 8:12 pm

Another of my client sites had the same issue and didn't tell me about it until today. I fixed it, using the instructions I provided above, and it is working fine now.......but still.......... Is there a security patch needed for 2.5?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30810
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: table jos_session crashed, what is the cause?

Post by Per Yngve Berg » Tue Feb 12, 2013 9:21 pm

I believe this is a Mysql issue rather than Joomla. The database server must have been interrupted somehow.
A fix can be to move the database to a separate server that is optimized as a database server.

bcraigie
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Mon Apr 25, 2011 11:45 am
Location: Scotland
Contact:

Re: table jos_session crashed, what is the cause?

Post by bcraigie » Tue Apr 02, 2013 11:28 am

This happened to my server yesterday and today. Both times, the hardware had hard hung and needed a reboot. The sessions table was broken after the reboots. So I think that explains why my site had problems. In my case, I'm planning to move my sites to new hardware in order to sort the problem (stop the hang).

If you are not the one who maintains your hardware, perhaps it was caused by a reboot you were unaware of (or beyond your control).

HTH

Brian


Locked

Return to “Joomla! 1.5 Bug Reporting”