|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-02-25 08:13 UTC] laruence@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: laruence
[2016-02-25 08:13 UTC] laruence@php.net
[2016-04-05 12:35 UTC] danny at myheritage dot com
[2017-01-12 03:58 UTC] 804368954 at qq dot com
[2018-04-02 09:11 UTC] www dot maben at foxmail dot com
[2018-04-03 12:19 UTC] ruudk at mphuis dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 14:00:02 2025 UTC |
Description: ------------ Sometimes, after running a deploy using Capistrano and clearing the Opcache using a curl request that executes opcache_reset() we get loads of 500 Internal Server errors. In our error log we see something like this: [12-Feb-2016 08:45:31 UTC] PHP Fatal error: Class 'CartBundle\Service\PaymentService���' not found in /company/releases/20160212084602/cache/prod/frontendProdProjectContainer.php on line 7805 It's never the same class that's missing, it's never the same server that has the problem. It occurs random. The solution is always to execute the opcache_reset() again or to restart PHP FPM. Some more errors: [10-Feb-2016 15:33:10 UTC] PHP Fatal error: Class 'Monolog\Handler\AbstractProcessingHandler���' not found in /company/releases/20160210153329/cache/prod/classes.php on line 1111 PHP Warning: include(): Failed opening '/company/releases/20160209133021/vendor/richsage/rms-push-notifications-bundle/RMS/PushNotificationsBundle/RMSPushNotificationsBundle.php�php' for inclusion (include_path='.:/usr/share/php:') in This one is also remarkable, because you see lots of weird characters in the filename. Feb 09 14:29:51 website-webserver-i-46b1b4cb php_errors.log: [09-Feb-2016 13:29:50 UTC] PHP Warning: include(): Failed opening '/company/releases/20160209133021/vendor/richsage/rms-push-notifications-bundle/RMS/PushNotificationsBundle/RMSPushNotificationsBundle.php���(N{�k' for inclusion (include_path='.:/usr/share/php:') in So to me it appears to be a race condition that corrupts the opcache. We run 2 of 3 webservers behind a loadbalancer with a couple of hundred people online simultaneously. We use the following opcache settings (rest is standard): [opcache] ; Determines if Zend OPCache is enabled opcache.enable=1 ; The OPcache shared memory storage size. opcache.memory_consumption=192 ; The amount of memory for interned strings in Mbytes. opcache.interned_strings_buffer=16 ; The maximum number of keys (scripts) in the OPcache hash table. ; Only numbers between 200 and 100000 are allowed. opcache.max_accelerated_files=32531 ; How often (in seconds) to check file timestamps for changes to the shared ; memory storage allocation. ("1" means validate once per second, but only ; once per request. "0" means always validate) opcache.revalidate_freq=1 It looks to be related to https://bugs.php.net/bug.php?id=70656 which is closed/solved.