Opcache module and 503 errors

Silverstripe Version: 4.11

I have noticed an issue on Silverstripe on shared hosting on cpanel that I think is related to the opcache module. On some sites I get an occasional 503 error with a white screen of death. Clearing the silverstripe-cache folder resolves the issue. On this particular site the issue was intermittent.

On a new install recently (on a different web host provider) the site would load once then all subsequent visits returned a 503 error. However when I removed the opcache module from PHP settings, the site loaded perfectly.

Has anyone experienced this as well? Is there a recommended setting that is needed to allow the opcache module to stay?

I can’t see any error messages nor am I sure where to look for this type of error. All the standard logs come up blank.

This sounds like something that should probably be opened as an issue in Github so that it can be triaged and treated as a bug.

Yes I agree. I just wanted to see if anyone else has experienced as it could be an edge case due to something I have implemented. It feels like one of those issues that no-one else will be able to reproduce. It only happens on a few sites for me so it could be a combination of things causing it.

Funnily enough we experienced smoe OpCache weirdness just yesterday, which was causing (in this case) config variables to not be read (or possibly set) properly. Still trying to get to the bottom of it, but turning off OpCache makes it all go away

Hmm, interesting. Do please let me know if you figure anything out.