I have a long running (3 hours) shell script running on a CentOS 7 machine. The script runs a loop with an inner loop and calls
curl in each iteration.
I'm starting the script with PM2 because it's already on the system and it's good for managing processes. However it seems that it might not be good for shell scripts. When I came in this morning I saw that PM2 had restarted my shell script 6 times. The PM2 logs say it received a SIGINT and was restarted. Since this script results in data being pushed to a database that means my data has been pushed 6 times. That's no bueno.
I'm the only person that logs into the box so it's not another user.
So, next question is whether this is a bug in PM2 or a legit SIGINT. Which begs the question: if it is legit, where is it coming from? I have to determine (if possible) if the OS is somehow killing this process before I submit this as a bug in PM2 (which seems like the most likely thing).