pksteyn / php-fpmpal

PHP-FPM script that makes recommendations on max_children
GNU General Public License v3.0
55 stars 23 forks source link

php-fpmpal.01.sh AND PHP7 #15

Open inetbiz opened 7 years ago

inetbiz commented 7 years ago

php-fpmpal.01.sh needs updating to detect php7.0-fpm

richardforth commented 7 years ago

Good shout. But don't hold your breath. I work with Pieter and I have asked about this project and he doesn't actively work on it any more.

I would advise that if you are able to you can fork it and apply the changes and make a pull request. I can then ask him to merge the changes back.

I'm not as confident with php-fpm or bash scripting to make the changes myself.

On 17 Jul 2017 14:29, "Denver Prophit Jr." notifications@github.com wrote:

php-fpmpal.01.sh needs updating to detect php7.0-fpm

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pksteyn/php-fpmpal/issues/15, or mute the thread https://github.com/notifications/unsubscribe-auth/AFpUVxNwbjQNXvy-9zOvPYqPs0zaF156ks5sO2HJgaJpZM4OZ-S4 .

inetbiz commented 7 years ago

@richardforth I've forked it. If the PR isn't managed, I'll unfork and make a duplicate and take up the project.

richardforth commented 7 years ago

Sounds good. I'll talk to Pieter tomorrow about it.

On 17 Jul 2017 16:56, "Denver Prophit Jr." notifications@github.com wrote:

@richardforth https://github.com/richardforth I've forked it. If the PR isn't managed, I'll unfork and make a duplicate and take up the project.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/pksteyn/php-fpmpal/issues/15#issuecomment-315785944, or mute the thread https://github.com/notifications/unsubscribe-auth/AFpUVxabOPCCoiJGeaDszeASVsSvPBxoks5sO4L9gaJpZM4OZ-S4 .

richardforth commented 7 years ago

Hi, I also got the same actually today, php fpm is running but php-fpmpal not able to detect it:

 (        )  (         (     (       *
 )\ )  ( /(  )\ )      )\ )  )\ )  (  `                 (
(()/(  )\())(()/(     (()/( (()/(  )\))(             )  )\
 /(_))((_)\  /(_))     /(_)) /(_))((_)()\  `  )   ( /( ((_)
(_))   _((_)(_))      (_))_|(_))  (_()((_) /(/(   )(_)) _
| _ \ | || || _ \ ___ | |_  | _ \ |  \/  |((_)_\ ((_)_ | |
|  _/ | __ ||  _/|___|| __| |  _/ | |\/| || '_ \)/ _` || |
|_|   |_||_||_|       |_|   |_|   |_|  |_|| .__/ \__,_||_|
========================================= |_| =============

!!! PHP-FPM not detected. Exiting. !!!
$ ps auxfwww | grep fpm | grep -v grep
root      5121  0.0  0.7 316588 30764 ?        Ss   09:58   0:00 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
nginx     5126  0.1  1.0 398928 42140 ?        S    09:58   0:01  \_ php-fpm: pool www
nginx     5129  0.1  1.0 398932 41804 ?        S    09:58   0:01  \_ php-fpm: pool www
nginx     5131  0.1  1.0 398916 42080 ?        S    09:58   0:01  \_ php-fpm: pool www
nginx     6657  0.2  0.9 397600 37000 ?        S    10:15   0:00  \_ php-fpm: pool www
nginx     6658  0.2  0.9 397612 36956 ?        S    10:15   0:00  \_ php-fpm: pool www
sizrar commented 6 years ago

Hi ,

I had the same issue,m resolving it on debian with these changes. I'd be glad to send a pull request if you want. ``

sizrar commented 6 years ago

Sorry for messing up with github's markdown ... I wanted to post the diff patch file but obviously not the right method ...

sizrar commented 6 years ago

So, this to detect php-fpm7.0 as it is named in debian

Switches

function usage() { @@ -76,6 +75,13 @@ if [ $? == 0 ]; then fpmtype=`php5-fpm -i 2>&1 | grep "SERVER[\"\"]" | cut -d\/ -f4` fi

+php-fpm7.0 -v 1> /dev/null 2>&1 +if [ $? == 0 ]; then

And this to detect the available memory

@@ -420,16 +429,18 @@ echo -n "Memory available to assign to PHP-FPM pools in KB: "

RHEL 7's free reports look different to CentOS6, Ubuntu 14 and Debian 8 so I have to 1) check whether this is RHEL/CentOS 7, and 2) if it is, use different formulas

rhel7_check=0
if [ -f /etc/redhat-release ]; then