Join the community today
Become a Member

PHP-FPM Beta Branch CentOS 7.x CentOS 7 Proper PHP-FPM systemd service file

Discussion in 'Beta release code' started by eva2000, Jan 26, 2019.

  1. eva2000

    eva2000 Administrator Staff Member

    38,023
    8,350
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,863
    Local Time:
    12:41 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    once more testing and user feedback from folks like yourself is done, then yes it will be added by default in 123.09beta01
     
  2. rdan

    rdan Premium Member Premium Member

    4,500
    1,079
    113
    May 25, 2014
    Ratings:
    +1,576
    Local Time:
    10:41 PM
    Mainline
    10.2
    I have this setup working fine on 2 new server install.
     
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    38,023
    8,350
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,863
    Local Time:
    12:41 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Thanks for the feedback. More feedback and testing from various folks will speed up it's inclusion into 123.09beta01 code base eventually :) :D
     
    • Optimistic Optimistic x 1
  4. wmtech

    wmtech Member

    83
    23
    8
    Jul 22, 2017
    Ratings:
    +58
    Local Time:
    3:41 PM
    We also have this installed at some machines and working without problems so far...
     
    • Like Like x 1
  5. eva2000

    eva2000 Administrator Staff Member

    38,023
    8,350
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,863
    Local Time:
    12:41 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Thanks for the confirmation :)
     
  6. pamamolf

    pamamolf Premium Member Premium Member

    3,167
    304
    83
    May 31, 2014
    Ratings:
    +551
    Local Time:
    4:41 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    What's the benefit of that?
     
  7. eva2000

    eva2000 Administrator Staff Member

    38,023
    8,350
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,863
    Local Time:
    12:41 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Access to PHP-FPM stats right from php-fpm service status and fpmstats commands
    Code (Text):
    fpmstats
    Processes active: 0, idle: 30, Requests: 241, slow: 0, Traffic: 0req/sec
    pool:                 www
    process manager:      static
    start time:           09/Feb/2019:01:59:34 +0000
    start since:          45423
    accepted conn:        243
    listen queue:         0
    max listen queue:     0
    listen queue len:     128
    idle processes:       29
    active processes:     1
    total processes:      30
    max active processes: 6
    max children reached: 0
    slow requests:        0
    

    Code (Text):
    fpmstatus
    * php-fpm.service - PHP FastCGI Process Manager
       Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/php-fpm.service.d
               `-limit.conf
       Active: active (running) since Sat 2019-02-09 01:59:34 UTC; 12h ago
     Main PID: 3361 (php-fpm)
       Status: "Processes active: 0, idle: 30, Requests: 243, slow: 0, Traffic: 0req/sec"
       CGroup: /system.slice/php-fpm.service
               |-3361 php-fpm: master process (/usr/local/etc/php-fpm.conf)                                                         
               |-3362 php-fpm: pool www                                                                                             
               |-3363 php-fpm: pool www                                                                                             
               |-3364 php-fpm: pool www                                                                                             
               |-3365 php-fpm: pool www                                                                                             
               |-3366 php-fpm: pool www                                                                                             
               |-3367 php-fpm: pool www                                                                                             
               |-3368 php-fpm: pool www                                                                                             
               |-3369 php-fpm: pool www                                                                                             
               |-3370 php-fpm: pool www                                                                                             
               |-3371 php-fpm: pool www                                                                                             
               |-3372 php-fpm: pool www                                                                                             
               |-3373 php-fpm: pool www                                                                                             
               |-3374 php-fpm: pool www                                                                                             
               |-3375 php-fpm: pool www                                                                                             
               |-3376 php-fpm: pool www                                                                                             
               |-3377 php-fpm: pool www                                                                                             
               |-3378 php-fpm: pool www                                                                                             
               |-3379 php-fpm: pool www                                                                                             
               |-3380 php-fpm: pool www                                                                                             
               |-3381 php-fpm: pool www                                                                                             
               |-3382 php-fpm: pool www                                                                                             
               |-3383 php-fpm: pool www                                                                                             
               |-3384 php-fpm: pool www                                                                                             
               |-3385 php-fpm: pool www                                                                                             
               |-3386 php-fpm: pool www                                                                                             
               |-3387 php-fpm: pool www                                                                                             
               |-3388 php-fpm: pool www                                                                                             
               |-3389 php-fpm: pool www                                                                                             
               |-3390 php-fpm: pool www                                                                                             
               `-3391 php-fpm: pool www                                                                                             
    
    Feb 09 01:59:34 hostname systemd[1]: Starting PHP FastCGI Process Manager...
    Feb 09 01:59:34 hostname systemd[1]: Started PHP FastCGI Process Manager.
    

    notice the line in status output
    Code (Text):
       Status: "Processes active: 0, idle: 30, Requests: 243, slow: 0, Traffic: 0req/sec"
    
     
    • Like Like x 1
  8. pamamolf

    pamamolf Premium Member Premium Member

    3,167
    304
    83
    May 31, 2014
    Ratings:
    +551
    Local Time:
    4:41 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Do i have to recompile/update first php from menu and then use:

    Code:
    curl -sL https://gist.githubusercontent.com/centminmod/a84a86775925ea558fece1f0ac130be3/raw/php-systemd.sh | bash -s fpm-systemd

    Or should i run the command first and then recompile/update php?
     
  9. eva2000

    eva2000 Administrator Staff Member

    38,023
    8,350
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,863
    Local Time:
    12:41 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    this :)
     
  10. pamamolf

    pamamolf Premium Member Premium Member

    3,167
    304
    83
    May 31, 2014
    Ratings:
    +551
    Local Time:
    4:41 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    For me running the command and then update to the new version didn't work.

    I had to run the command again and now is ok :)

    Not sure if i did all correct as i was following the topic and i was run:

    Code:
    curl -sL https://gist.githubusercontent.com/centminmod/a84a86775925ea558fece1f0ac130be3/raw/php-systemd.sh | bash
    and then:

    Code:
    curl -sL https://gist.githubusercontent.com/centminmod/a84a86775925ea558fece1f0ac130be3/raw/php-systemd.sh | bash -s fpm-systemd
    and then update php from menu......
     
    • Informative Informative x 1
  11. pamamolf

    pamamolf Premium Member Premium Member

    3,167
    304
    83
    May 31, 2014
    Ratings:
    +551
    Local Time:
    4:41 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Also using dynamic when i run fpmstats i can see only this:

    and not this as your example:

     
  12. eva2000

    eva2000 Administrator Staff Member

    38,023
    8,350
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,863
    Local Time:
    12:41 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    yes dynamic and ondemand only show processes that are active unlike static which runs all php-fpm children even if not active
     
..