I can't figure out why, but when I'm connected to a memcache server the thumbnail generation process in Assets hangs for long periods of time, the
getElements process throws 403 errors, the generating thumbnails throw 401 errors and then the user is signed out.
This happens in 2 different AWS environments and on my local environment configured using MAMP. In total, three different memcache servers (production, stage, local) have this same thing occur.
The only thing I can find in the logs that seems like it could be related is an error message that reads:
Tried to restore session from a cookie, but the given login name does not match the given uid. UID: LONG_UID_HASH_HERE and loginName: MY_EMAIL_ADDRESS.
I'm currently running Craft CMS 2.6.3019 (most current version of 2.x at the moment).
Edit: I also wanted to mention these assets all reside in an Amazon S3 bucket. Thought that might be relevant here, too.
Edit 2: I forced
hasThumb() to always return
false by commenting out these lines. The thumbnails don't generate 401 errors (because no thumbnails are being generated and the placeholder images are being used instead). And
getElements runs much quicker, but it stills throws 403 errors after clicking around for some time.