wodby / php

Generic PHP docker container images
MIT License
152 stars 103 forks source link

Skip addition of opcache.preload to prevent NewRelic errors #146

Closed andypost closed 3 years ago

andypost commented 3 years ago

NewRelic reading ini files even when opcache is disabled

php_cron_1   | time="2021-06-17T09:25:00Z" level=info msg="2021-06-17 09:25:00.066 +0000 (178 178) warning: User instrumentation from opcache: opcache status information is not an array" channel=stderr iteration=2 job.command="/usr/local/bin/drush cron" job.position=0 job.schedule="* * * * *"
$ php -r 'var_dump(opcache_get_status());'
2021-06-17 10:17:58.532 +0000 (291 291) warning: User instrumentation from opcache: opcache status information is not an array
bool(false)

if I disable opcache I get this warning anyway

Later in logs

2021-06-17 10:19:42.351 +0000 (335 335) warning: User instrumentation from opcache: error obtaining opcache status, even though opcache.preload is set
andypost commented 3 years ago

Workaround is comment out ;opcache.preload = "" in /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini

andypost commented 3 years ago

Thank you a lot!