Skip to main content

How to kill stuck processes that block your deployments

Comments

2 comments

  • Alex Miu

    By the way,
    you can also use the pkill command. I find it easier to do pkill php or pkill node. The pkill command kills processes by name, and it kills all of them, no need to check each individual id. Since you are trying to get the container redeployed everything is probably safe to kill. Only processes started by the user web can be killed. In cases where you’re not sure what is keeping it stuck, pkill everything coming from the user web. If that didn’t change anything, time for a support ticket.

    0
  • Matthias Van Woensel

    Another tip: if you have a cron that regularly causes issues but can’t find the cause.

    Simply prepend timeout 290s to the command. This will automatically kill the cron if it runs for longer than 290seconds (a little less than 5 minutes).

    So your cron would become:

      blocker:
        spec: '*/5 * * * *'
        cmd: 'timeout 290s /bin/bash /app/block.sh'
    
    0

Please sign in to leave a comment.