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

Wesker

Well-known 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

$config['cache']['cacheSessions'] = 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:

https://xenforo.com/community/threads/being-logged-out-of-admin-cp-on-any-and-every-action.98611/

https://xenforo.com/community/threa...dmin-cp-every-few-minutes-session-time.89281/

https://xenforo.com/community/threads/admincp-always-logged-out.75308/

https://xenforo.com/community/threads/constantly-logged-out-of-admin.57624/

https://www.google.com.ph/webhp?sou...g+logged+out+admincp+xenforo+site:xenforo.com
 
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.
 
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.
 
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.
 
We are using APC as recommended by xF.
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.)
 
Just to clear up what I did here since a few people have asked. I changed this:

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

to

Code:
$config['cache']['cacheSessions'] = false;

Which resolved the issue.
 
Top Bottom