Questions tagged [opcache]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
11 votes
1 answer
24k views

How to forcibly completely clear PHP7 opcache?

The opcache on my webserver keeps hitting the limit I have set even though I feel like I don't have that much PHP code and it really ought to be enough room. This is compounded by the fact that even ...
Andrew Stine's user avatar
5 votes
1 answer
9k views

Php 7 opcache v php 5.6 xcache

We're provisioning a new server and are deciding between (php7 / opcache) and (php5.6 / xcache). We run a few chunky ecommerce sites and want the best possible performance. I'm looking for ...
Tim's user avatar
  • 53
5 votes
2 answers
4k views

PHP OPcache is resetting cache automatically

I started using the built-in PHP OPcache of PHP 5.6 and am facing a problem now. I set it up to use up to 1 GB of RAM, which is highly enough for my websites but it never get get it to use the full 1 ...
KittMedia's user avatar
  • 248
4 votes
1 answer
2k views

IIS 8 with PHP 5.6: WinCache VS Zend Op Cache

Zend Op Cache is compiled by default on PHP5.5+, but IIS encourages use of WinCache for opcode caching. what is the extension that will give me the best performance and stability on IIS? there are ...
Simone Nigro's user avatar
3 votes
2 answers
829 views

How to let OPcache work correctly under chroot?

There is PHP-FPM and OPCache (downloaded and compiled from php.net) opcache.enable = 1 opcache.use_cwd = 1 zend_extension=opcache.so php-fpm profiles run in chroot, i.e. /home/user1/www/index.php -&...
nikitasius's user avatar
3 votes
1 answer
1k views

What causes Opcache to manually restart

I've setup opcache with php-fpm but for some reason, it keeps manually restarting. I've not actioned a restart and I've set the force restart timeout to 2700 seconds (2 hours) so the cache shouldn't ...
James's user avatar
  • 183
3 votes
1 answer
622 views

OPcache cache same file for different users only once

Is there some way to make OPcache use a hash or target a specific directory on each domain to disable use_pwd so it won't cache the same packages over and over? By default OPcache appends the working ...
ButterMilkMan's user avatar
3 votes
1 answer
966 views

PHP Application with Web Root on Amazon EFS using up too much EFS bandwidth

The web root /var/www/html is mounted on EFS Mounting with usual AWS advised command and General Purpose EFS sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 fs-...
Pasta's user avatar
  • 302
3 votes
0 answers
183 views

How does apache2.4 maintains php7.0 opcache in prefork model

Does each apache2.4 child processes maintain their own opcache or is there a global opcache shared by all children?
kalyan's user avatar
  • 249
2 votes
1 answer
1k views

php-fpm generated a lot of load when resetting opcache, rendering server unresponsive

In recent weeks we experienced a negative phenomenon when deploying code: the server becomes unresponsive sometimes for a few minutes. Here's an example of the load on the server when this happened: ...
mark's user avatar
  • 1,526
2 votes
0 answers
347 views

PHP OpCache on Amazon EFS

Looking for some validation of my thought process here. I don't have the stats to hand to back up my claims, but have enough experience with web hosting with and without EFS to be comfortbale in ...
jsjw's user avatar
  • 43
2 votes
0 answers
195 views

Is it possible to use Opcache to specific website only?

I run few wordpress websites on single Vps server. (Ubuntu 18.04 + Nginx + php7.3 + mariadb) I was changed code like below to use opcache in php.ini. opcache.enable=1 opcache.enable_cli=1 opcache....
Seomari's user avatar
  • 21
1 vote
1 answer
1k views

How to flush PHP-FPM OpCache on an autoscaling PHP cluster?

On our current monolithic LAMP servers we deploy via Capistrano and reload PHP-FPM at the end of a deployment, in order to flush the Opcode Cache. Now, we're building a new webhosting cluster on AWS ...
Martijn Heemels's user avatar
1 vote
2 answers
678 views

Can APC and OpCache co-exist in PHP5.4

We are generally running php 5.4.x with APC enabled on CENTOS for our production sites. We have a new app that is segfaulting and the development team thinks it is because we've got APC. The app is ...
Wyatt Barnett's user avatar
1 vote
1 answer
273 views

Bad response when try install opcache

I have problem for install zendopcache I try 1 time and other and always have the same result i don´t know what it´s bad because this can install with php 5.6 , thanks and also i delete and clean yum ...
Jos's user avatar
  • 31
1 vote
1 answer
2k views

Opcache not working properly

I got problem with Opcache. It's not working as I wish/desire.. This is my opcache configuration cat /etc/php/7.1/apache2/php.ini | grep opcache [opcache] opcache.enable = 1 opcache.enable_cli = 1 ...
Valor_'s user avatar
  • 127
1 vote
1 answer
625 views

Apache2 php_admin_flag opcache.enable on is ignored

I run Apache 2.4.10 with PHP 7.1.17 on my Debian 8.10 server. When I try to enable opcache in a vhost the changed setting isn't applied. If I enable opcache globally in the php.ini everything is ...
oivlis111's user avatar
0 votes
2 answers
8k views

Why a PHP module is not loaded into PHP?

Showing my case how to debug the problem, that a PHP module is not loaded into PHP. I use OpenSUSE v42.2 Linux OS, with Apache webserver, PHP v7.1, Mysql. Because it does not provide PHP v7.1 I need, ...
klor's user avatar
  • 354
0 votes
1 answer
112 views

php70-php-opcache preventing CMS install

We have an Apache 2.4 box with php7 from the Remi repo working fine. PHP processing is as expected. This is apart from the php7-php-opcache package which, upon install, prevents the successful ...
pmelon's user avatar
  • 21
0 votes
0 answers
87 views

opcache_reset() keeps returning false

I have a web server running WordPress on Nginx and PHP-FPM (PHP 8.0). When a PHP file is changed, it will be detected by a separate program and opcache_reset() is called repeatedly until it succeeds. ...
Akihiro HARAI's user avatar
0 votes
1 answer
186 views

Load Balance (http) nodes slower when Redis is non-local

We run a load balance with 3 Windows 2019 servers. One of them is the "master" one, serving SMB share to the other nodes, and it's also the server that Redis runs on (Redis used for sessions ...
Alex's user avatar
  • 3
0 votes
1 answer
189 views

PHP-FPM stops seeing classes / functions at random

I am experiencing a strange issue with php-fpm (7.0.33). At random times it starts throwing errors like: PHP message: PHP Fatal error: Uncaught Error: Call to undefined function untrailingslashit() ...
Arkadiusz 'flies' Rzadkowolski's user avatar
0 votes
1 answer
99 views

XCache serves wrong file version from opcache

Lets say that I have two versions of the same file. One is app/v1/lib/ExampleClass.php, and another resides in app/v2/lib/ExampleClass.php. To conserve memory, xcache creates opcache for only single ...
Palethorn's user avatar
  • 103
0 votes
1 answer
428 views

Opcache ignoring certain settings in php.ini after httpd restart

I have recently updated my Centos 6, Apache server to php 5.6 from 5.4 and I'm attempting to configure opcache. I have updated my opcache settings in /etc/php.ini to: [opcache] opcache....
Arth's user avatar
  • 395
0 votes
0 answers
160 views

Is Zend Opcache automatically caching compiled version of PHP scripts?

I've enabled Zend Opcache. I expected it to compile and cache every single PHP script executed on my server but this doesn't seem to happen. Did I misunderstood how this cache works or I'm missing ...
Revious's user avatar
  • 207
0 votes
1 answer
183 views

How to override the previous defined PHP value via Ansible PHP role?

I'm trying to apply override PHP's opcache.max_accelerated_files setting via geerlingguy's Ansible Role for PHP onto geerlingguy/centos6's VM using the following lines (as part of provisioning script):...
kenorb's user avatar
  • 6,777
-1 votes
1 answer
912 views

Deployment PHP with OpCache

How do you do deployment PHP applications with enabled OpCache? My situation: I have web server with PHP 7.4 and enabled OpCache. Server is common virtual 4vCPU + 8GB RAM. I use tool Deployer - ...
grogsy's user avatar
  • 99