Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-19, 07:28:52

Author Topic: PHP-FPM separation for clients  (Read 5436 times)

0 Members and 1 Guest are viewing this topic.

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
PHP-FPM separation for clients
« on: 2016-10-05, 15:04:39 »
Hi Mustafa,
can you take a look at https://ma.ttias.be/a-better-way-to-run-php-fpm/.

Often, there is some issues and i need to run fixphp or reload PHP-FPM service, but it affects all clients right?
Also, there are no sepration of APC/OPcache which is a must for us to use.

Can you plan implementing what's suggested here?
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: PHP-FPM separation for clients
« Reply #1 on: 2016-10-05, 15:10:14 »
No options just restart php-fpm per-user. So, change something in php-fpm configs need restart.

As I know, php module (like apc or other) only possible per-version. So, impossible apc disable for userA but enable for userB.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: PHP-FPM separation for clients
« Reply #2 on: 2016-10-05, 15:27:43 »
Will a fixphp --client=client1 only restart client1's php-fpm process and not touch other client's PHP-FPM processes?

APC/OPCache : It's not about enabling and disabling on per user basis, but about separating their memory space due to security.


Another important thing Mustafa, PLEASE READ https://bugs.php.net/bug.php?id=69724 and switch to DYNAMIC until this bug is fixed! We have issues related to this as in our cloud hosting syncing uses multiple request at same time!

No options just restart php-fpm per-user. So, change something in php-fpm configs need restart.

As I know, php module (like apc or other) only possible per-version. So, impossible apc disable for userA but enable for userB.
« Last Edit: 2016-10-05, 15:32:31 by fossxplorer »
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: PHP-FPM separation for clients
« Reply #3 on: 2016-10-05, 16:33:22 »
Please googling about how to php-fpm work.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: PHP-FPM separation for clients
« Reply #4 on: 2016-10-06, 13:09:07 »
Mustafa, please please pay attention to what i post/suggest.
I've been using PHP-FPM for quite some time now and long before i started to use Kloxo-MR.
Let me know if you think i've overseen something though :)

So 2 major points with this thread is:
-  shared APC (possible APCu) and OPCache: it's a security issue in shared environment since the caches are SHARED AMONG ALL PHP-FPM pools.
- We SHOULD NOT USE ONDEMAND as the PHP-FPM process manager as there is a BUG:
The FPM pm.ondemand process manager has a subtle bug in the way it uses edge-triggered polling (with epoll() or kqueue()) that causes it not to notice when multiple requests arrive at the same time, and thus not to fork the appropriate number of children to handle them.


If you don't change to DYNAMIC, i'll have to do it in my custom config files as we can't live with this bug.
Our clients mostly sync data and it's done in parallell requests.
Of course when the bug is fixed, it's very good choice of going back to ONDEMAND since that will fit a shared hosting server better :)


Please googling about how to php-fpm work.
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: PHP-FPM separation for clients
« Reply #5 on: 2016-10-06, 13:41:10 »
Think php 5.5 and 5.6 already fix this issue because both versions still mantained by php.net.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: PHP-FPM separation for clients
« Reply #6 on: 2016-10-06, 16:33:40 »
Did you check 'admin > advanced php configure' (example for admin) for change 'php-fpm type'?
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.068 seconds with 19 queries.

web stats analysis