Closed jua-mp closed 8 years ago
yea we should wrap the sync server into a killable node script.
However I cannot reproduce this for the content server
However I cannot reproduce this for the content server
I can, 99% of the time. 1% of the time it works.
However I cannot reproduce this for the content server
I've gone so far as to create this script to restart the content server:
#!/bin/bash
NODE_PID=`ps ax | grep node | grep fxa-content-server | awk '{print $1}'`
kill "${NODE_PID}"
However I cannot reproduce this for the content server
I have been using a script that kills both processes for a long time, so I cannot really tell how often it happens, although I did have the feeling that it was all the time.
I've gone so far as to create this script to restart the content server:
I had one too, but it was far less elegant than yours and would mercilessly kill all my node processes:
#!/bin/bash
pkill -f fxa-content-server.js
I'll certainly start using yours :+1:
@jua-mp I was having a similar issue, but upgrading to pm2 1.1.3 seemed to fix it for me.
@vbudhram Thank you very much!
Nonetheless, it is explicitly defined as "pm2": "0.15.10"
in the fxa-local-dev/package.json
Does anybody know if there is a reason for this?
@philbooth NOTE TO SELF, do what Vijay did
After running ./pm2 kill I always have to kill two process manually.
Here the output of ps ax after running ./pm2 kill
This is just slightly annoying so it is not a big issue. It nevertheless causes the syncserver to fail while starting again, as there is already a server listening on the socket when it tries to bind to it.
Also, I am not sure of this should be filed against pm2 directly or if it has to do with how the processes are set up in the first place.
Possibly useful information:
Anyway, thank you very much! :smile: