Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: FCGID and opcache |
|
Author |
|
mrdj1024
Joined: 03 Apr 2023 Posts: 54 Location: Bridgeton,NJ,USA
|
Posted: Wed 16 Aug '23 18:02 Post subject: FCGID and opcache |
|
|
hello!
so im using mod_fcgid and i enabled opcache
i wanted to know if its safe to use both at the same time? i seen an article https://ma.ttias.be/how-to-clear-php-opcache/
that states
"FastCGI starts a new php-cgi process on every request and does not have a parent PHP process to store the Opcache results in.
In fact, having Opcache running in a CGI or FastCGI model would hurt performance: on every request the Opcache is stored in the FastCGI process (default behaviour if the Opcache extension activated), but that cache is destroyed as soon as that process dies after finishing the request."
so is it worth it to have it enabled? or should i disable the opcache? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 18 Aug '23 9:02 Post subject: |
|
|
The article is pretty old. My observation over the last few years is that opcache works fine with mod_fcgid. The cache lasts until you restart Apache.
"FastCGI starts a new php-cgi process on every request" That is nonsense. Fcgi(d) was developed to not have that, but a persistent process. That was the case with plain CGI. Those times are over. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1264 Location: Amsterdam, NL, EU
|
Posted: Thu 31 Aug '23 0:12 Post subject: |
|
|
My advice: disable opcache.jit (just in time) on Windows.
I have seen too many unpredictable errors with jit enabled. |
|
Back to top |
|
Otomatic
Joined: 01 Sep 2011 Posts: 212 Location: Paris, France, EU
|
Posted: Thu 31 Aug '23 8:43 Post subject: |
|
|
Hi,
I've been doing this for a long time for the various PHP versions of Wampserver:
Code: | ; To avoid errors VirtualProtect() failed [] Incorrect parameter
opcache.jit=off |
|
|
Back to top |
|
|
|
|
|
|