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

XF 1.3 Being logged out of Admin CP on any and every action

Discussion in 'Troubleshooting and Problems' started by Wesker, Sep 19, 2015.

  1. Wesker

    Wesker Active Member

    Short description of the issue is that sometimes it works, sometimes it constantly logs us out. For example, this time around, it took me 12-18 attempts to just login. As soon as I try to make an action inside admincp such as change the usergroup, logs me out again. Sometimes it takes me 50+ logouts and eventually I can make an action.

    We have recently migrated so I assume this is a server configuration issue, likely a cache issue.

    - Both www and non-www versions of your URL are working.
    - IP isn't changing
    - Not receiving any errors, just logging out
    - Happening in all browsers
    - Using cloudflare but have turned all performance off so just running the DNS, nothing more through them
    - It's only affecting the AdminCP, not the forum itself

    When removing this from config.php and making it false

    The problem goes away. However, is there anyway around this without having to turn off cache sessions?

    The issue is common as reported here:





    rbharathi likes this.
  2. Wesker

    Wesker Active Member

    Just to be clear, the issue has been temporarily fixed but it requires disabling cache each time I want to make a change inside ADMINCP or if in event the problem just decides to go away which it randomly does.
    rbharathi likes this.
  3. Mike

    Mike XenForo Developer Staff Member

    If disabling the cache sorts in, then the session is either failing to be written to the cache in the first place or it's being removed by the time the next page view comes around. What cache system are you running?

    I wouldn't really recommend caching sessions unless you're using something like Memcached. Traditionally, if you're using APC, it doesn't use LRU expiration out of the box, so filling up the cache (even with opcode caching) would lead to this; this is why you have to explicitly opt into caching sessions.
    Wesker and rbharathi like this.
  4. Wesker

    Wesker Active Member

    Yes there are alot of recommendations on XF Boards about different types of caching, tons of threads on it, so many it gets a bit confusing which is the best one. I think we need to make some tweaks here.

    We are using APC as recommended by xF.
    rbharathi likes this.
  5. Mike

    Mike XenForo Developer Staff Member

    I wouldn't recommend caching sessions with this, unless you can guarantee enough memory allocated for all files and all user data. The opcode caching part of APC is massively recommended though.

    (On a side note, that presumably means you're using PHP 5.4. As of recently, 5.4 is no longer a maintained release by the PHP team, though your OS may do some backporting. Just FYI.)
    Wesker and rbharathi like this.
  6. Wesker

    Wesker Active Member

    Actually we're using PHP 5.3+ so we do need to upgrade here. What version do you recommend?
  7. Mike

    Mike XenForo Developer Staff Member

    The most recent stable version of PHP if you can, which would be 5.6 right now. 5.5 at a minimum though.
    Wesker likes this.
  8. Wesker

    Wesker Active Member

  9. Wesker

    Wesker Active Member

    Just to clear up what I did here since a few people have asked. I changed this:

    $config['cache']['cacheSessions'] = true;

    $config['cache']['cacheSessions'] = false;
    Which resolved the issue.

Share This Page