1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

xf_session marked as crashed -- happening daily/crashing. MYSQL Optimize Results within

Discussion in 'Troubleshooting and Problems' started by demonkey, Dec 7, 2012.

  1. demonkey

    demonkey Member

    Hi everyone,
    My site has been troublesome since migrating from VB4 in May. Recently it's got a lot worse. Currently averaging 60-80 users online at a time (mostly "guests"/bots lately), forum site is 350,000 posts /28,000 threads.

    Running latest version of XF and disabled all plugins, yet almost nightly (when nobody's online really) the server crashes for reasons I can't figure out. Usually I can fix it in the morning by REPAIR TABLE XF_SESSION

    Here's what I spotted in admin panel the last couple of nights:
    I ran the MySQL Optimize script and here's what the output said, maybe someone can help with this:
    Should I make the changes it says? I'm new to most of this and have been trying hard to make sense of this. Searching got me this far and I've been able to fix it each time, just running out of patience. :(
  2. MattW

    MattW Well-Known Member

    Are you on a dedicated server? I had this issue with my forum when it was on phpBB3, and it was a dying HDD causing various tables to crash randomly.
    Jake Bunce likes this.
  3. demonkey

    demonkey Member

    Hi Matt,
    It's a VPS and there are a few other sites on this server that have had no issues to date. I'll check the HDD though!
  4. MattW

    MattW Well-Known Member

    Are you able to post a copy of your my.cnf file? There looks to be quite a few things you can improve on based on the results of mysqltuner.
    Jake Bunce likes this.
  5. demonkey

    demonkey Member

    Here's my.cnf:
    The commented bits were from previous troubleshooting...
  6. CyclingTribe

    CyclingTribe Well-Known Member

    AFAIK (and someone with more experience may be able to confirm/deny this) - the session table data is a current list of login sessions and can be truncated without any damage to the site itself (the worst outcome being people have to log back in again because their 'session' data is lost).

    With that in mind you could try changing it to a (HEAP) MEMORY table to see if that stops it crashing? (with the data in memory it won't survive a server reboot, but that's okay, people can just log back in.)

    If you have phpMyAdmin, select the table, select the Operations tab - then change the Storage Engine to MEMORY - and click Go. I'm not sure of the SQL command to do this, perhaps someone else could chip in with that?

    Shaun :D
    Jake Bunce, demonkey and MattW like this.
  7. MattW

    MattW Well-Known Member

    So that's not got any adjustments in it then :whistle:

    How much RAM do you have on the VPS, just so we can set the innodb buffer pool?
    Jake Bunce likes this.
  8. demonkey

    demonkey Member

    Thanks Shaun I can give this a shot as well.
  9. demonkey

    demonkey Member

    Thanks for the help Matt. It should be 1 GB
  10. MattW

    MattW Well-Known Member

    So under the [mysqld] part add:

    That should at least get you started.
    Jake Bunce likes this.

Share This Page