Announcement

Collapse
No announcement yet.

PHP daemon killed mysteriously

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

  • PHP daemon killed mysteriously

    I have a php script, which runs as daemon (by root user) and only writes current time to log file. This scripts is killed misteriously after 10-15 mins with no message to any log file. OS: Centos 6.9 + Cloudlinux + CageFS + cPanel. If I run the same daemon on Centos 6.9 only it doesnt stop. Is there something related to Cloudlinux which can kill the background process?
    Scripts can be found in attached file.

  • #2
    We have a cronjob which do kill php scripts which belongs to init as parent, seems your script is affected by it.

    Try commenting out /etc/cron.d/kill_orphaned_php-cron :

    Code:
    */5 * * * * root bash /usr/sbin/kill_php_script

    Comment


    • #3
      Is there a way to exclude a script from that cron? I have disabled it now and will try to see if it is the reason for killing my script. Will keep you in touch. Thanks.

      Comment


      • #4
        I worry there is no way to skip just your script, e.g. the file will be overwritten with the next update.

        Actually, the right way to disable cronjob is to edit /etc/sysconfig//cloudlinux and change to Y:

        Code:
        disable_kill_orphaned_cron = Y

        Comment


        • #5
          Thanks Bogdan. This solved my problem.

          Comment

          Working...
          X