Custom Build 2 - PHP 7.3.3 - Opcache problem

cdemers

New member
Joined
Mar 25, 2019
Messages
1
Greetings Everyone,

Anyone having a problem with PHP 7.3.3 with Opcache enabled using up 100% cpu? Just did an update and all my WordPress sites are having problems. Just disabling opcache fixes it. But then I loose that optimisation. Been looking around online and only thing I saw about php 7.3 and opcache was about reset behaviour. I have been just using the default settings and everything was working fine till about a month or so ago when I did my usual updates. Then started getting high cpu usage on all the servers that I updated. Runing PHP as FPM.

PHP 7.3.3 (cli) (built: Mar 18 2019 20:52:12) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.3, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.3.2, Copyright (c) 2002-2018, by ionCube Ltd.

Any suggestions? Report to upstream? If it is working well for yourself with this version, what are your opcache settings?

Thank you.
 
lsphp73 opcache ini values -- incl. opcache debug log

Hi, I am not currently experiencing the CPU issues you describe.
I am offering what I use for opcache ini in hopes that you might find something useful there :)

Note: you prob. want to change the path for the blacklist file to match your setup.



Code:
; Determines if Zend OPCache is enabled
opcache.enable=1

; Determines if Zend OPCache is enabled for the CLI version of PHP
opcache.enable_cli=1

; If disabled, all PHPDoc comments are dropped from the code to reduce the
; size of the optimized code.
;opcache.save_comments=1

; The OPcache shared memory storage size.
opcache.memory_consumption=128

; 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.
; If value is not a prime number, then nearest prime number greater than setting value will actually be applied
opcache.max_accelerated_files=16229

; Allows exclusion of large files from being cached. By default all files
; are cached.
;opcache.max_file_size=0

; 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=2

; Leads OPcache to check file readability on each access to cached file.
; This directive should be enabled in shared hosting environment, when few
; users (PHP-FPM pools) reuse the common OPcache shared memory.
opcache.validate_permission=1

; When this directive is enabled, the OPcache appends the current working
; directory to the script key, thus eliminating possible collisions between
; files with the same name (basename). Disabling the directive improves
; performance, but may break existing applications.
;opcache.use_cwd=1

; Enables or disables file search in include_path optimization
opcache.revalidate_path=1

; Allow file existence override (file_exists, etc.) performance feature.
opcache.enable_file_override=1

; Preferred Shared Memory back-end. Leave empty and let the system decide.
;opcache.preferred_memory_model=

; Enables and sets the second level cache directory.
; It should improve performance when SHM memory is full, at server restart or
; SHM reset. The default "" disables file based caching.
; RPM note : file cache directory must be owned by process owner
;   for mod_php, see /etc/httpd/conf.d/php.conf
;   for php-fpm, see /etc/php-fpm.d/*conf
;opcache.file_cache=

; Enables or disables opcode caching in shared memory.
;opcache.file_cache_only=0

; Enables or disables checksum validation when script loaded from file cache.
;opcache.file_cache_consistency_checks=1

; OPcache error_log file name. Empty string assumes "stderr".
;opcache.error_log=

; All OPcache errors go to the Web server log.
; By default, only fatal errors (level 0) or errors (level 1) are logged.
; You can also enable warnings (level 2), info messages (level 3) or
; debug messages (level 4).
;opcache.log_verbosity_level=1

; Allows calling OPcache API functions only from PHP scripts which path is
; started from specified string. The default "" means no restriction
;opcache.restrict_api=

; The location of the OPcache blacklist file (wildcards allowed).
; Each OPcache blacklist file is a text file that holds the names of files
; that should not be accelerated.
opcache.blacklist_filename=/usr/local/lsws/lsphp73/etc/php.d/opcache*.blacklist
 
Back
Top