PHP 7.3 - OPcache not cachings scripts

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
74
PHP 7.3 - OPcache not caching scripts

When testing with the following configuration:

- Debian 9
- PHP 7.3.9 (php-fpm)
- OPCache

OPCache doesn't seem to be caching any scripts. Downgrading to PHP 7.2 fixes the issue.

I've tested this on 2 different servers, using the following OPcache monitoring script:

https://github.com/rlerdorf/opcache-status/blob/master/opcache.php

10-directadmin.ini:

Code:
extension_dir=/usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731
zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_7.3.so
zend_extension=/usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/opcache.so
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=0
opcache.enable_cli=1
opcache.validate_permission=1
opcache.use_cwd=1
opcache.revalidate_path=1
opcache.enable_file_override=1
opcache.enable=1
Anyone else experiencing this issue?
 
Last edited:

Wanabo

Verified User
Joined
Jan 19, 2013
Messages
170
On CentOS 7 it works.

general
Host server.somedomain.eu
PHP Version PHP 7.3.9 fpm-fcgi Linux
Opcache Version Zend OPcache 7.3.9
Uptime 16 hours and 22 minutes
Last Restart 37 seconds ago
memory
Used Memory 25.6M
Free Memory 58.2M
Wasted Memory 44.2M
Current Wasted Percentage 34.6

Must be a Linux distribution thing.
 

wattie

Verified User
Joined
May 31, 2008
Messages
1,052
Location
Bulgaria
My experience with opcache on shared hosting was negative. I didn't feel much difference in server load (if there was any, it wasn't very noticeable for me). On the other hand it loaded much more RAM (each fpm process was much bigger than with opcache disabled - I guess it loads a copy of the cache for each process). Therefore I used the wasted ram for better things - tmpfs for the /tmp folder for example :)
 

vacancy

Verified User
Joined
Jul 5, 2019
Messages
30
I'm having the same problem. (openlitespeed - centos 7)

opcache is not functional in php 7.3. Cache hits, Cache misses, Cached scripts, Cached keys null.

1.png
 
Last edited:

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
74
Any update on this? Websites on PHP 7.3 seem to be a lot slower than on PHP 7.2, and nothing seems to be cached. Running fresh Debian 9, PHP-FPM.

Opcode Caching Up and Running
Optimization Enabled
SHM Cache Enabled
File Cache Disabled
Startup OK
Shared memory model mmap
Cache hits 0
Cache misses 0
Used memory 8770936
Free memory 259664520
Wasted memory 0
Interned Strings Used memory 396408
Interned Strings Free memory 5894624
Cached scripts 0
Cached keys 0
Max keys 7963
OOM restarts 0
Hash keys restarts 0
Manual restarts 0
 

vacancy

Verified User
Joined
Jul 5, 2019
Messages
30
opcache does not work in php 7.3.10.

I thought there was a bug with version 7.3.9, but the problem continues in the updated version 7.3.10.
 

vacancy

Verified User
Joined
Jul 5, 2019
Messages
30
The issue was found to be related to ioncube version 10.3.8.

The response from Ioncube;

Code:
We are aware of this issue which only affects the PHP 7.3 ionCube Loader.

10.3.9 release which should become generally available later this week or early next week.
If you don't need ioncube, disable ioncube_loader_lin_7.3.so from /usr/local/php73/lib/php.conf.d/10-directadmin.ini and run rewrite_confs.
 

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
74
The issue was found to be related to ioncube version 10.3.8.

The response from Ioncube;

Code:
We are aware of this issue which only affects the PHP 7.3 ionCube Loader.

10.3.9 release which should become generally available later this week or early next week.
If you don't need ioncube, disable ioncube_loader_lin_7.3.so from /usr/local/php73/lib/php.conf.d/10-directadmin.ini and run rewrite_confs.
This solves the issue for me, thanks!
 
Top