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

Users keep getting logged out

Discussion in 'Troubleshooting and Problems' started by account8226, Sep 22, 2012.

  1. account8226

    account8226 Guest

    Hello XenForo,

    I have a problem on my forum, I have a dedicated server with cloudflare, I'm using the reverse IP proxy for XenForo in both config.php and my litespeed settings.

    I like visiting my forum each 24 hours. But each 24 hours I need to logg in back...

    It's quite annoying for lazy people who won't loggin back and stay as visitor.

    I tried using that rule :
    $config['cache']['cacheSessions'] = true;

    uising my config.php; but it is making high loads on my server.

    And I rewrite my www url to non www.

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. account8226

    account8226 Guest

    Hey thanks for the help.

    I don't know what do you mean by memory cache, but I am using the following lines in my config.php :
    $config['cache']['enabled'] = true;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
    /*$config['cache']['cacheSessions'] = true;*/
    When I enable $config['cache']['cacheSessions'] = true; it's getting my server high load so I removed the line.

    If I have cloudflare, should I disable $config['cache']['enabled'] ?

    Sory for my English.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    For the purpose of troubleshooting this problem, yes.
  5. Dinh Thanh

    Dinh Thanh Well-Known Member

    Be sure turn "Use Client IP in Header" to Yes to prevent other issues.
  6. account8226

    account8226 Guest

    Yes it was on 'Yes'.

    It's making higher loads on my forum. Is this the only way to fix the problem ? I guess it would be useless to DISABLE caching for sessions since it's false by default ?
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Did it fix the problem? If so then we know the session problem is caused by an unhealthy cache backend. You will need to check on your cache, make sure it's big enough, check the uptime, etc.
  8. account8226

    account8226 Guest

    I just disabled it. I was afraid to make my forum lag. I'll let you know in 24 hours, thanks for the help.

    BTW with CloudFlare, XF's cache is useless isn't it ?
  9. account8226

    account8226 Guest

    24 hours after disableing the cache it looks like it didn't fixed the problem.
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  11. account8226

    account8226 Guest

    #3 is showing my correct IP.
    #2 : URL are redirected to non www.

    But it's strange on my ipod or google chrome secret account it's not logging me out.

    Maybe it's just a security for my admin account on firefox ? I'll ask my members thanks for the help Jake.
  12. audiokid

    audiokid Active Member

    I have this problem and I am a cloudserver as well. Only for preparing to go back to my dedicated. My members are getting pissed and so am I. It logs us out endlessly. Did you ever get this resolved? Any help would be appreciated.

    I tried this and it didn't work:

    // Cloudflare visitor IP
  13. Mike

    Mike XenForo Developer Staff Member

    You mention a "cloudserver", but I'm unclear if you actually mean CloudFlare -- the line you've used is specific to CloudFlare. Other servers that pass requests through a reverse proxy may use a different header to forward on the original IP. You would need to adapt that line to use that header.
  14. SneakyDave

    SneakyDave Well-Known Member

    You only need the HTTP_CF_CONNECTING_IP check if you're NOT using a module in Apache or nginx that gets the correct users' IP address.

    I use cloudflare and nginx, and caching, but I do not cache sessions, and don't have the problems you describe.

    If you use CF's rocket loader, try turning that off, or try putting CF in development mode, or turn it off "as much as you can" to see if that resolves the issue. I don't use that rocket loader POS from CF. There might be other CF tools or options that are interfering with cookie expiration, but I'd definitely start with that Rocket Loader thing, and turn that off.

Share This Page