Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.
This object is in archive! 

FastCGI Process Manager (FPM) SAPI

Nathan Lierbo shared this idea 12 years ago
Completed

now that php-fpm is part of php itself, how easy is it/ will it be to enable it in easyapache?I have revised the thread title to better describe the specific feature being requested. At the present time I am not aware of any short-term or long-term plans to officially support the FPM SAPI that was added in PHP version 5.3.3; however, if interest grows substantially and more feedback is received for the feature request then support for the FPM SAPI may be reconsidered in the future.


This thread may serve as the central discussion line for feedback about the FastCGI Process Manager (FPM) SAPI that was added in PHP version 5.3.3; please use this feature request to share any questions, concerns, and thoughts you have regarding implementation, including discussing problems that it may pose, what benefit or usefulness it may or may not have, and what issues are alleviated by supporting the FPM SAPI.


Your detailed feedback and discussion contributions are very much appreciated. Thank you.


Original thread: http://forums.cpanel.net/f145/case-46575-fastcgi-process-manager-fpm-sapi-new-php-5-3-3-a-161210.html

Best Answer
photo

We are planning to release FPM with EasyApache 4. At this time, we are targeting BETA release of EasyApache 4 in cPanel & WHM 11.50.


For more information regarding EasyApache 4, please see this forum post:

http://forums.cpanel.net/f133/easyapache4-announcement-447882.html

Replies (48)

photo
2

http://forums.cpanel.net/f189/php-fpm-fastcgi-apc-293802.html


Some sort of a workaround here, but it would be nice to see this implemented in Easyapache.

photo
7

PHP-FPM will help a lot with needed memory of opcode caches such as xcache, apc, etc...

photo
4

Having this on EasyApache will give us CloudLinux users a way to have a decent and working PHP setup that doesn't involve installing custom crons to avoid going out of memory only by a few sites.


Interesting comments at http://forums.cpanel.net/f5/apache-graceful-restarts-fastcgi-mod_fcgid-cant-lock-process-table-pid-151373.html

photo
2

I think it would be awesome to see support for this in easyapache.

photo
1

If anyone has a decent workaround in 11.36 + Apache 2.4 + PHP 5.4 I would appreciate it. It's such a moving target to try and recreate an old recipe on a later version. I'm happy to help document issues if you can get me started.... Guys, this seems to be the future and can avoid adding nginx.

photo
1

What are cPanel waiting for? Sometimes looks like they live in another world.. come on.. do you want to be one of those companies one step ahead? Or you want to be like those companies from the past? Come on.. show us some love!!

photo
2

After a 4hour research why my APC cache kept flushing/restarting every few minutes/hours it turns out i need php-fpm. Seeing that this is part of php 5.3 it saddens me that there is no way to install this in cpanel.


Please create this option as it brings a correct working implementation of the popular APC to cpanel.


The reason this topic hasnt got much votes is simply because people don't understand to what good this leads to. I've come across so many questions, comments and problems with APC in cpanel that could actually get a valid answer.


Please fix this asap and save stackoverflow some bandwith!

photo
1

Please - at least give us a workaround. This is the only reasonable performance solution left as all others (that you support) have major drawbacks. This is even built into apache 2.4 so please do not limit the application.

photo
2

PHP-FPM is the ONLY method of fastcgi that allows opcode caches to share 1 cache storage a also not purge cache during recycles.


Please add it to easyapache!

photo
2

There is wide interest in this feature. This feature would help further secure cPanel as leading hosting software out there and really speed up our server and save valuable resources. Many thanks for all your work; Please implement!

photo
1

Be carefull though, all users sharing the same cache makes it dangerous to use APC's object cache as all sites can access and modify each others cache. The only way around this would be to run a seperate intance of php-fpm for each account multiple config files with 1 pool per config file.


I would be interested to know how http://cpxstack.sysally.net get's around letting users configure their URL rewrites…


Edit :


I've just seen their video that shows a user choosing their nginx rules, very nice indeed ! :)


Not sure how they manage to have both apache and nginx on the same port, but it seems the video seems to show exactly how it should be done.


Could cPanel look into working with them to get it checked by cPanel and implemented officialy by cPanel ?

photo
1

@monarobase:

i think theyve got nginx as a reverse proxy and easyapache is sitting in the background :)

photo
3

Very interested in this. Many experienced users that previously recommended mod_fcgid now recommend PHP-FPM instead.

photo
2

monarobase

APC? Just use PHP's replacement for APC and use Redis or Memcache for variables.

This http://us2.php.net/manual/en/intro.opcache.php replaced APC for a while now. And PHP's official opcache is built into 5.5 but also works with 5.3 and 5.4.

photo
1

Based on what I've seen from other features. We may not have PHP-FPM support until 2015 the earliest. hehe


Fingers crossed.

photo
2

why the cpanel update cycle is to slow. How Long Will We Have to Wait ?

photo
3

In my opinion, this is the most important piece of technology that cPanel is currently missing.

photo
2

I'd like to see this within CPanel as well. In the meantime how about some in depth instructions on implementation?

photo
1

Depth instructions on implementation would be nice as well!

photo
3

I have researched a lot and Apache 2.4 in Event MPM + php-fpm seems to be the best performance combination for php (no need to use Nginx + php-fpm).


Event MPM can be set in EasyApache, but php-fpm not. Why? As long as Cpanel offers PHP 5.5 (that has php-fpm built in), offering php-fpm is a must for Event MPM.


Otherwise, Event MPM becomes barely useless in the EasyApache purpose.

photo
3

cP team, why is not developed? Please, add to your to-do list.

PHP-FPM is a basic feature option.

photo
2

Agreed, let's get this into cPanel as an option (like yesterday!).

photo
2

Guys, we really need it to better performance.

Do you recomend any plugin for this improvement?

photo
2

Just want to remind cpanel that the ideal setup if users are to have oopcode cache is to run a full php-fpm instance per user and not just have multiple pools. So there should be an option for admins who want to supply oopcode cache to have one instance of php-fpm + one single pool per user versus one single instance of php-fpm with multiple pools.


Lsapi (litespeed's PHP) already offers a similar option allowing a single shared oopcode cache per user that other users can't access

photo
1

Uhm.... Please add support? Pretty please even?

photo
1

The php-fpm sapi does not work 100% well with Apache right now . Cpanel is not the people to blame as apache support is the culprit here . If you check in nginX land php-fpm is the only option here and its support is very mature. You have the option to use php-fpm with nginx at full swing if opting for cpanel plugins like http://ndeploy.in .

photo
1

This is fairly simple to implement with apache 2.4+ and would be a huge boon to servers with busy sites. What's the holdup ?

photo
1

We are planning to release FPM with EasyApache 4. At this time, we are targeting BETA release of EasyApache 4 in cPanel & WHM 11.50.


For more information regarding EasyApache 4, please see this forum post:

http://forums.cpanel.net/f133/easyapache4-announcement-447882.html

photo
1

"At this time, we are planning to release FPM SAPI support with EasyApache 4."

What''s the ETA on that? Btw you can check this LINK, it can help with the implementation.

photo
1

Clouseau wrote:

"At this time, we are planning to release FPM SAPI support with EasyApache 4."

What''s the ETA on that? Btw you can check this LINK, it can help with the implementation.

We're hoping to have an early beta of EA4 in 11.50, however this may change as the project evolves. We posted an announcement recently on our blog, I hope you have some time to check it out and provide some feedback!


http://blog.cpanel.net/easyapache-4-announcement/

photo
2

This would be the most welcomed feature ever ;)

photo
1

Any update on when we could expect to see the beta of EA4?

photo
1

EA4 will probably be out in 11.52. It did not make it into 11.50.

photo
1

That is very very disappointing, but clearly you have a lot on your plate.

photo
1

Hello, that is correct. Please keep an eye on our Blog for more information.


http://blog.cpanel.com/upcoming-web-stack-changes/

photo
1

Here is the ChangeLog of 11.50 (Include the 1st EA4 version): https://documentation.cpanel.net/display/ALD/11.50+Change+Log

photo
1

I have created a set of scripts for Apache 2.4 and PHP 5.4 (and up) on the current EA3 system. It requires a custom template for Apache and some values added for when EA runs.


My version creates a socket for each user, and the calls are passed via mod_proxy for the users. I am interested to see Cpanel's implementation of this.


If someone wants to look at the scripts I would be willing to share.

photo
1

That would be awesome! I'd love to see your implementation of this. Do you have this on GitHub or BitBucket by chance?


Note: For EA4, we'll only be providing an RPM. It's on my backlog to integrate PHP-FPM with Nginx this year. With FPM and EA4 initially, you'll need to make manual work to get it working.

photo
1

Currently I have it as a text file that I just run from and the scripts are either in the file or on one of my file dump locations. I will probably clean it up and add it to my gitlab server.


I have some stuff I could clean up from when I was using ports instead of sockets, but the system works and has been running on ourshared server for a long time.


The performance gain we have had with this build has been pretty significant, and its nice that users don't have to set folders to 777 to upload files.


I attached the file for you to look at.

photo
2

All we need is decent performance and per-user processing. mod_ruid2, mod_itk or fpm that allows user permissions AND is compatable with caching, modsec and opcache. not too much to ask is it?

photo
1

It's like a woman... you like it all. Not always posible, and if it's, will be very dificult to find it.

Seriously talking. Fastcgi + PHP-FPM have processing and permissions per-user, it's compatible with caching (opcache), but i don't remember if it's compatible with ModSec... but i sure that is posible too.

photo
2

I dont want some 3rd party tools. I am paying cPanel 45$/month per server. And multiply that by milions of severs. I expect cPanel to implement this as somethinf native and bug-less. Everything beside that is complete fail.

photo
1

PHP-FPM is stable under a low load but I find crashes more often then litespeed's API under a high load. Cloudlinux's lsapi is more performant and will probably (if not already) soon be more stable like with native litespeed.


PHP-FPM is only secure with Opcache when a seperate instance is run per user. Lsapi has a processgroup method that makes it secure nativly.


If cPanel implements a config file / instance per user than PHP-FPM would be secure with opcache. However I don't see that hapening.

photo
1

Is it really going to be available with EasyApache 4?

photo
1

Same here. cPanel is standing in the way of our Nginx and php-fpm deployment, which is untenable. This needs a fast resolution.

photo
1

While php-fpm might be planned, I haven't seen any indication that nginx is planned in the near future. Seems to me like you are trying to use the wrong tool for the job.

photo
1

I wan't kindly to notify here, cPanel development and FAST does not fit

to the same sentense, I would like to speed things a bit my self too,

thought I understand the security and usability first policy, but if you

can just make things work with other panel, why it's so hard to develop

cPanel then?

photo
1

Right now is not a situation like its 100% not available. We have nginx + php-fpm implemented as a cPanel third party app ( listed in the cPanel app catalog ) for a very long time .Please check out https://support.sysally.net/projects/ndeploy/wiki

cPanel has a huge ecosystem and there are many dev's integrating their plugins with cPanel .

photo
1

I wouldn't like to use a plugin, it's one more piece of software to worry about updates and future incompatibilities.


EasyApache 4 was around the corner, I don't know why it's taking so long...

photo
5

Hello,

EasyApache 4 is almost here! It's currently in EDGE, and we've provided a PHP-FPM RPM that you can install and get configured manually. We're hoping to extend cPanel functionality and support for FPM in the very near future, but this is a start!

photo
1

that sounds awesome.

photo
1

Aleluia!

photo
1

If I set php-fpm I will have to use "Allow File" to use mod_rewrite?

photo
1

can we use easyapache 4 in a normal cpanel install? we really need fpm.

photo
1

Hi! I'm not sure exactly what you meant, so I'll try to answer the question from multiple fronts.


EA4 is in 11.52 at the moment, however it's not quite production ready and is still considered a technical preview. While it's decently stable (I've ran it on my personal production system for 6 months now), things are changing rapidly and until at least 11.54, I'd recommend only running EA4 if you're experienced and comfortable with the web stack and associated systems.


Also, currently in EA4 FPM support is only providing an RPM, after which manual configuration is required. FPM can technically be used with EA3, but it's not supported and it requires around the same sort of manual configuration that's required with EA4. We expect to expand this integration and support in future releases.


I hope this helps!

photo
1

EasyApache 4 has been released to the CURRENT tier, which includes initial support for FPM.

photo
1

This tied into Cloudlinux yet? As in are the both of you on the same page?

photo
1

Can you elaborate on your questions? We've provided FPM support for EasyApache 4, not for CloudLinux, so I'm not sure what you mean.

photo
1

I'm pretty sure manual configuration means you'll have to set up the php-fpm pools by yourself for each user.


I'd go with mod_lsapi / lsphp for now from CloudLinux if you need something like FPM. Still in beta, but the lastest release works quite well.

photo
1

Yeah, I'll stick with lsapi, as it is faster than fpm anyways. Fpm is the way to go if you do t use CL. And Jacob, I was curious if CL monitoring aspects were tied into it yet. Based on your reply I'm guessing they don't tie into your betas.

photo
1

CloudLinux has been working a while now getting CloudLinux working with EasyApache 4. We have a few of their packages ready, but we're still working out final integration details.

photo
1

Hi,

As we stated, this is the first implementation of FPM inside EA4. There's a secondary feature request open ( https://features.cpanel.net/topic/enhance-fpm-support ) for expanding this support, which we hope to have in 11.54.

Replies have been locked on this page!