kill_orphaned_php-cron kills PHP-FPM master process
Forum
  1. Forums
  2. General
  3. General Discussion
  1. Michael Holforty
  2. Friday, 07 March 2014
  3.  Subscribe via email
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 doesn't kill the php-fpm master process or make installing it optional.
Rate this post:
  1. 04.04.2014 14:04:14
  2. # 1
Dolphi Accepted Answer
Posts: 1
Joined: 04.04.2014
0
Votes
Undo
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 CloudLinux\'s
/etc/cron.d/kill_orphaned_php-cron)

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

Dolphi
  1. 28.06.2014 09:06:20
  2. # 2
Posts: 4
Joined: 20.06.2014
0
Votes
Undo
I\'ve wasted a lot of time tracking that down too, compiled php with debug, looked for cores, ran with strace.
What\'s 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.
  1. 30.06.2014 03:06:35
  2. # 3
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
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:

/bin/ps -Ao\"pid,etime,command,ppid\" | grep -v php-fpm | /bin/grep \' 1$\' | grep -E \"/bin/bash /usr/local/bin/ph|php\"
  1. 15.07.2014 04:07:19
  2. # 4
Michael Holforty Accepted Answer
Posts: 14
Joined: 07.03.2014
0
Votes
Undo
that would work for me.  returns nothing on my FPM servers.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.