• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Odin PHP packages and op-code caching - needs fixing

Alan_SP

Basic Pleskian
As I wrote on thread about Odin PHP packages, there's a problem with xcache. After I looked a bit at this problem, there's seems to be problem with all op-code cachers.

My posts about this problem start with this post: http://talk.plesk.com/threads/pleas...t-odin-php-packages.335242/page-2#post-790816

For op-code caching to work as it is intended, it needs having setting PHP_FCGI_CHILDREN set to at least one (or more), otherwise caching is flushed for each process, leading to losing all benefits of op-code caching.

Is there a way that you could look this a bit more and found solution for op-code caching in you PHP packages? Just installing op-code cachers in fast cgi mode doesn't solve this issue. It seems that this is a problem with fast chi mode, but with setting PHP_FCGI_CHILDREN to 1 or more maybe can solve that. Or not, as they mention that there can be problems when using this setting: https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
 
The solution is use FPM instead of FastCGI handler type to get opcache benefits out of the box.
 
@IgorG I tried solution you mention in link, it breaks Odin PHP packages implementation and website went into using server original PHP package. Good thing is that original cgi_wrapper is first saved by renaming it, so I was able to restore original state.

There needs to be something else to be added into replacement cgi_wrapper so it can use Odin PHP packages, or completely different approach to this.

@SergeyUgdyzhekov this depends on two things:

1) Odin PHP packages should support FPM approach. At the moment they support only fast_cgi.
2) If my websites would be able to work with server PHP package, I then can use whatever PHP implementation I want. At the moment I need Odin PHP packages.
 
@SergeyUgdyzhekov this depends on two things:
1) Odin PHP packages should support FPM approach. At the moment they support only fast_cgi.
2) If my websites would be able to work with server PHP package, I then can use whatever PHP implementation I want. At the moment I need Odin PHP packages.[/QUOTE]

Plesk built in PHP packages support PHP-FPM on Centos 7 / RHEL 7 and Plesk 12.5. You are never going to get proper caching using FAST-CGI. As others have said you need to use PHP-FPM.
 
Last edited:
I tried the FPM setting, but it breaks a a small set of PHP code that we use to allow our visitors who subscribe to our premium podcast packages to login to our special RSS feeds. With the FPM handler enabled, it doesn't take the logins and constantly generates login prompts.

So if I could fix that singular problem somehow, I could use FPM. Otherwise, as you folks observe, FastCGI doesn't work very well with Opcache.

If there are any PHP mavens in the audience, I'd be delighted to submit that PHP code privately. It probably needs a simple fix, but my webmaster has been stumped so far.

Anyone?

Peace,
Gene
 
Yes, as danami already notes: Plesk's PHP builds support FPM on OS with Apache 2.4 on board.
 

Attachments

  • Screen Shot 2015-12-15 at 10.25.35.png
    Screen Shot 2015-12-15 at 10.25.35.png
    49.1 KB · Views: 4
Strange, I have Ubuntu server, Apache 2:
Server version: Apache/2.4.7 (Ubuntu)

I don't have option to change PHP to FPM, only fast_cgi. I wanted to go with centos, but templates from my server provider offers only Plesk with Ubuntu. But, if there's support for all Apache 2.4 servers, I have a problem I don't know about.

It seems that I'll need to wait for Ubuntu support for FPM mode.
 
Strange, I have Ubuntu server, Apache 2:
Server version: Apache/2.4.7 (Ubuntu)

I don't have option to change PHP to FPM, only fast_cgi. I wanted to go with centos, but templates from my server provider offers only Plesk with Ubuntu. But, if there's support for all Apache 2.4 servers, I have a problem I don't know about.

It seems that I'll need to wait for Ubuntu support for FPM mode.
* Check mpm module on Tools & Settings -> Apache web server. 'Event' should be chosen.
* Check if any FPM handler enabled on Tools & Settings -> PHP settings
 
When changing MPM module to event it broke my website, Apache stopped working and I couldn't restarted it manually. I was able to enable it again when I switched back to prefork.

Also, when I checked PHP modules, for 5.3.29 (this PHP version I need at the moment) I have only cgi and fast_cgi. For newer PHP versions I have FPM mode, but at the moment I need to use PHP5.3.

It seems I'll need to stick with fast_cgi till I'd be able to upgrade my website to software version that supports latest PHP versions.
 
* Check mpm module on Tools & Settings -> Apache web server. 'Event' should be chosen.
* Check if any FPM handler enabled on Tools & Settings -> PHP settings
sorry, just checking out. is this suppose to be available on centos 6.6 too? i cant find the option to change mpm module. interested on FPM handler too. httpd 2.2
 
Back
Top