XF 1.2 Users Being Logged Out When Checking Remember Me

I just said this in a recent ticket:

Session problems generally appear for one of a few reasons:

1. A change in cookie paths and/or domains creates a conflict. This would often cause the logout issues. The easiest way around this is to change the cookie prefix.

2. Sessions are being stored in a cache and are being evicted. This is very common with APC. We don't recommend storing sessions in APC. In general, we don't recommend using APC as a data cache; we prefer Memcache.

3. The IP address is changing from page view to page view. This could be a user issue, but it wouldn't change based on your server. However, this will often happen because there is a reverse proxy system in place. Commonly, this is something like CloudFlare, but I'm not sure if AWS has something similar. If this is the case, the IP being seen by XenForo (and your server) is that of the proxy, not the original user. Ideally, you want to fix this at the web server level so that your logs reflect the user IP. However, you can fix it with a hack in config.php which pulls the IP in from a different HTTP header (usually HTTP_X_FORWARDED_FOR).

Otherwise, I don't think there are any known reasons.
 
I will note this: I was storing sessions in MySQL when this was happening. One of my forums even had almost 1GB worth of overheard in the session table when I switched from MySQL to memcache for storing sessions. Since switching all of my sites from storing sessions in MySQL to memcache I have not had a single complaint about this.
 
Top Bottom