We run WordPress in an Elastic Beanstalk environment and I’m trying to use EFS for the wp-content/cache directory so WP Rocket’s cache files are shared across all ELB instances. The mount is set up and working... both instances have /wp-content/cache symlinked to /mnt/efs/wp-content/cache and I can see the cache files there.

What I’m running into is that occasionally I’ll hit a page on the site and it will have no styles. The browser console shows a 404 for the stylesheet (which is minimized and combined by WP Rocket and stored in /wp-content/cache/min/1/XXXXX.css), but if I look at the cache directory, the file is actually there and if I reload the page everything displays properly. It’s almost like the page is rendering before it realizes the file exists on the EFS mount. It doesn’t happen every time I visit a page, but it happens enough that I can’t deploy this setup to our live site in the current state (I’ve been testing it in a staging environment). https://www.neeapps.com/

Any advice? Has anyone else seen similar issues?



Update: So this is really weird. I did some more digging... both servers have the EFS mount mounted and symlinked, but each has different content in the cache directory. How is that even possible?

Update #2: Ok, so it looks like the EFS mount isn’t actually happening. Argh, sorry for the confusion.

Aucune réponse