Announcement

Collapse
No announcement yet.

kill_orphaned_php-cron kills PHP-FPM master process

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kill_orphaned_php-cron kills PHP-FPM master process

    This has been driving me nuts. First, it took a while to figure out why my FPM was inexplicably dying every 10 minute after getting FPM installed. Obviously I tracked down your script /etc/cron.d/kill_orphaned_php-cron

    Now after php-fpm was happily running for a while, the script reappears after requesting some unrelated support from the datacenter. Turns out they did a forced re-installed of cPanel and followed by the CloudLinux as a shotgun approach to solving the issue.

    I can see that having this part of your lve-utils package is going to give me anxiety since whenever new cloudlinux updates are required, or whenever I ask for support from the datacenter, or even if the datacenter asserts their "managed server" prerogative to install any of these updates, my php is going to get killed.

    I really think this was a bad idea on your part. Maybe you can rewrite it so that it doesnt kill the php-fpm master process or make installing it optional.

  • #2
    Hi,

    I had the same problem. A new server with CloudLinux and Directadmin control panel. Our customers
    were receiving "500 Internal server error" pages intermittently.
    And messages similar to:
    FastCGI: incomplete headers (0 bytes) received from server
    were logged in apache error log.
    (Since the FastCGI was not able to communicate the php-fpm master which was killed by CloudLinuxs
    /etc/cron.d/kill_orphaned_php-cron)

    Others had the same problem: http://forum.directadmin.com/showthread.php?t=48026

    Dolphi

    Comment


    • #3
      Ive wasted a lot of time tracking that down too, compiled php with debug, looked for cores, ran with strace.
      Whats crazy is that the way the script is written, it only kills php-fpm if it is run a daemon by init, so running through gdb or from the command line was fine!

      Can we have an official update or something that remedies this issue ? It should be real easy to exclude php-fpm from the culling.

      Comment


      • #4
        We have tested cron under different panels and conditions, even without panel with nginx + php-fpm but yes looks like we missed some setup. Could you show me the output of the following command execution? That is the pattern is from /etc/cron.d/kill_orphaned_php-cron, it search for php processes which will be killed:

        Code:
        /bin/ps -Ao"pid,etime,command,ppid" | grep -v php-fpm | /bin/grep  1$ | grep -E "/bin/bash /usr/local/bin/ph|php"

        Comment


        • #5
          that would work for me. returns nothing on my FPM servers.

          Comment

          Working...
          X