Ubuntu 18.04 with PHP 7.2.15 using PHP-FPM
I'm running several WordPress sites (version 5.2.2), and for each of these WP sites using symlinks in the mu-plugins folder to load plugins in another directory on the server. This is so that we can update the linked plugin file and have it automatically updated for all of our WordPress sites
The problem that I am encountering is that at times, for some of these sites PHP returns a "Failed opening" warning or error (depending on whether we are using include() or require(), respectively):
As an example:
Warning: include_once(): Failed opening '/www_vol/data/www-data/templatefiles/wp/plugins/wp-fail2ban/wp-fail2ban.php' for inclusion (include_path='/usr/share/php:/www_vol/data/library') in /www_vol/data/www-data/wordpress/wp-settings.php on line 293
Call Stack:
0.0008 402944 1. {main}() /www_vol/data/www-data/wordpress/index.php:0
0.0019 405232 2. require('/www_vol/data/www-data/wordpress/wp-blog-header.php') /www_vol/data/www-data/wordpress/index.php:17
0.0030 420784 3. require_once('/www_vol/data/www-data/wordpress/wp-load.php') /www_vol/data/www-data/wordpress/wp-blog-header.php:13
0.0041 433280 4. require_once('/www_vol/data/www-data/wordpress/wp-config.php') /www_vol/data/www-data/wordpress/wp-load.php:37
0.0055 549752 5. require_once('/www_vol/data/www-data/wordpress/wp-settings.php') /www_vol/data/www-data/wordpress/wp-config.php:102
Note that there is no further error message, such as "file not found" or "could not read file" as are received in some other examples of this error
Here's the relevant function call at line 293:
include_once( $mu_plugin );
Where mu-plugin is '/www_vol/data/www-data/wordpress/wp-content/mu-plugins/wp-fail2ban.php', which is a symlink to another file on the system:
$ ls -l /www_vol/data/www-data/wordpress/wp-content/mu-plugins/wp-fail2ban.php
lrwxrwxrwx 1 www_pool nobody 75 Feb 11 13:58 /www_vol/data/www-data/wordpress/wp-content/mu-plugins/wp-fail2ban.php -> /www_vol/data/www-data/templatefiles/wp/plugins/wp-fail2ban/wp-fail2ban.php
I confirmed that both the symlink as well as the linked file both exist, and are readable (has others read permission) and that all parent directories have others read and execute permission.
I have found a number of questions here where people have run into problems with relative links in the include() or require() function, but our path is absolute here.
Strangely enough, restarting PHP-FPM seems to resolve the issue, but it eventually comes back on another site.
Thanks for any advice