Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have the Zend Opcache pecl extension working almost completely- except for that I have 4 files that technically are content-types of css and js - but are "php" files and get sent through fastcgi and on to php-fpm.

Because I am attempting to "cache" these files with different mime-types, I am guessing that php-fpm bugs out on those requests and is the reason that all I get back from only those specific files are 502 bad gateway nginx errors.

If I disable the opcache extension in my php.ini - everything (those files specifically) works.

So, naturally I decided to use the opcache.blacklist_filename option and have confirmed with a var_dump(get_opcache_configuration()) that the txt is loaded and said files are being "blacklisted"

Trouble is, when checking the catch_worker_errors or whatever to get a message in my php5-fpm.log file - I can see that keys and caching are still happening to those files.

I have given full directory paths in my blacklist file:

/var/www/folder/to/path/etc/js.php but that doesn't seem to change my nginx 502 errors.

So now I am wondering if perhaps - the process of going through the blacklist is somehow still hating those mime-types. How can I get around those mime types?

Should I temporarily change their mime types in a location block and then after they've been passed to php-fpm add headers back on? - tell me there's a better option!


It's only happening to four files that all have in common content-type headers in the php code to render them as css or js - and ONLY when opcache is enabled - I am wondering if because these files are getting gzipped before going to php-fpm - if that's causing the problem. I don't know how to get these files to NOT get "Affected" by opcache - because even when blacklisted they seem to still cause problems.

My php5-fpm log shows stuff like this - immediately following specifically those files. I have grepped for "code"

[17-Feb-2014 05:03:44] WARNING: [pool www] child 12144 exited with code 1 after 403.931720 seconds from start
[17-Feb-2014 05:04:12] WARNING: [pool www] child 12170 exited with code 1 after 339.796702 seconds from start
[17-Feb-2014 05:05:03] WARNING: [pool www] child 12303 exited with code 1 after 81.675340 seconds from start
[17-Feb-2014 05:05:28] WARNING: [pool www] child 12307 exited with code 1 after 103.776170 seconds from start
[17-Feb-2014 05:05:40] WARNING: [pool www] child 12330 exited with code 1 after 88.766241 seconds from start
[17-Feb-2014 05:06:09] WARNING: [pool www] child 12367 exited with code 1 after 66.373515 seconds from start
[17-Feb-2014 05:06:14] WARNING: [pool www] child 12390 exited with code 1 after 45.985014 seconds from start
[17-Feb-2014 05:06:24] WARNING: [pool www] child 12396 exited with code 1 after 43.309683 seconds from start
[17-Feb-2014 05:06:24] WARNING: [pool www] child 12418 exited with code 1 after 10.380507 seconds from start
[17-Feb-2014 05:06:26] WARNING: [pool www] child 12413 exited with code 1 after 17.427910 seconds from start
[17-Feb-2014 05:06:27] WARNING: [pool www] child 12422 exited with code 1 after 2.872614 seconds from start
[17-Feb-2014 05:06:30] WARNING: [pool www] child 12423 exited with code 1 after 5.802936 seconds from start
[17-Feb-2014 05:07:01] WARNING: [pool www] child 12426 exited with code 1 after 34.673515 seconds from start
[17-Feb-2014 05:07:02] WARNING: [pool www] child 12427 exited with code 1 after 35.435561 seconds from start
[17-Feb-2014 05:07:03] WARNING: [pool www] child 12429 exited with code 1 after 33.082676 seconds from start
[17-Feb-2014 05:07:06] WARNING: [pool www] child 12440 exited with code 1 after 5.177906 seconds from start
[17-Feb-2014 05:07:10] WARNING: [pool www] child 12444 exited with code 1 after 8.086405 seconds from start
[17-Feb-2014 05:07:42] WARNING: [pool www] child 12445 exited with code 1 after 39.028909 seconds from start

The line before each child (with corresponding process #s) exit will log (because I wanted to see what was happening) the following:

[17-Feb-2014 04:53:43] WARNING: [pool www] child 11984 said into stderr: "Mon Feb 17 04:53:43 2014 (11984): Message Cached script '/var/www/repos/108way-core/system/includes/js.php'"
[17-Feb-2014 04:53:43] WARNING: [pool www] child 11984 said into stderr: "Mon Feb 17 04:53:43 2014 (11984): Message Added key '/var/www/secure/system/includes/js.php'"

Which I am wondering - is it normal for the caching / key to follow symlinks?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.