We're seeing an odd issue that I've been struggling to resolve.
Every now and then we do a deploy to our servers, and one server will start streaming errors into the logs along the lines of,
require_once(): Failed opening required '/var/www/CrrrectPath/Abstract.php'
(include_path='/var/www/') in /var/www/CorrectPath/Object.php on line 2
The issue is not always an include(). Sometimes a method name gets corrupted in the same way (a single character being replaced with another character).
Having debugged an affected server in production, I can see the files themselves are absolutely fine. My gut here is that the opcache of the files is getting corrupted in some way.
We had "validate_timestamps" enabled, so I figured it was plausible that the files were being re-read mid rsync (we r-sync from one folder to the "live" folder as part of our deploy). We then disabled "validate_timestamps" and are now doing a opcache_reset() when the code has been fully rsynced. The issue does happen less frequently, but we're still seeing occurrences.
Has anyone else come across this issue? Any suggestions for a resolution (other than completely changing how we deploy)?
For info,
$ php -v
PHP 7.0.21-1~ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jul 6 2017 09:38:10) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.21-1~ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
Thanks