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

XF 1.1 Why is the xf_session table MyISAM instead of InnoDB?

Discussion in 'XenForo Questions and Support' started by Mike Tougeron, Oct 20, 2011.

  1. Mike Tougeron

    Mike Tougeron Well-Known Member

    Why is the xf_session table MyISAM instead of InnoDB? When there is a large number of sessions the XenForo_Session::deleteExpiredSessions() that runs in the XenForo_CronEntry_CleanUp::runHourlyCleanUp() blocks other session inserts/updates since it locks the entire table to do the delete. This can then have a cascading impact on the performance of the page.

    I was thinking of changing it to InnoDB but I wanted to make sure there wasn't a reason for it before I did.

    Thanks, Mike
     
    Mow and James like this.
  2. Mike

    Mike XenForo Developer Staff Member

    We were seeing much slower writes with InnoDB in early tests. No particular reason not to change it if it's causing issues for you.
     
  3. Mike Tougeron

    Mike Tougeron Well-Known Member

    What version of MySQL were you testing against?
     
  4. Mike

    Mike XenForo Developer Staff Member

    5.0 most likely, though it may have been more related to the configuration of MySQL. Problem is, so many hosts haven't touched InnoDB so they may be running into the same issue. :)
     
    SneakyDave likes this.
  5. Mike Tougeron

    Mike Tougeron Well-Known Member

    k, thx. We're running 5.5.12-55-percona so I'll give InnoDB a shot.
     
  6. TheBigK

    TheBigK Well-Known Member

    Did that solve the problem for you? On our community, the sessions are all getting terminated after intervals.
     
  7. Chris D

    Chris D XenForo Developer Staff Member

    I can't see any mention of @Mike Tougeron having a problem - at least not like the one you're describing.

    You might be better off opening a ticket if you've discussed this on the forums and not found a solution.
     
  8. Mike Tougeron

    Mike Tougeron Well-Known Member

    Yeah, innodb worked fine for me. Like @Mike said it was a little slower but for our needs it was fine.
     

Share This Page