Nginx user process doesn't exist anymore

Hi,
One of our users cannot connect due to their nginx process not running, it was killed. I’m trying all signals to restart but all are looking for the process id that doesn’t exist anymore:
/opt/ood/nginx_stage/sbin/nginx_stage nginx --user=johndoe --signal=reopen

nginx: [alert] kill(34321, 3) failed (3: No such process)

Is there a way to restart user’s nginx if the user’s nginx process does not exist?

What’s the error you user sees? The nginx process not running is fine, that’s actually expected, you don’t want these things hanging around forever.

I think instead of restarting the nginx stage, we should look at the error this user is seeing and resolve that so you can create a brand new PUN.

We’ve found a solution by deleting a .sock file for the user:
rm /var/run/ondemand-nginx/johndoe/passenger.sock

and then restarting the pun:
sudo nginx_stage pun --user 'johndoe' --app-init-url 'https://myportal.edu/nginx/init?redir=%2Fpun%2Fsys%2Fdashboard%2F'

It may have been that killing the process using the Unix kill command did not also remove the .sock file. The error the user was seeing was “Service Unavailable” when accessing the portal page. The following error message displayed when the user tried accessing the dashboard URL https://myportal.edu/nginx/init?redir=%2Fpun%2Fsys%2Fdashboard
Error -- nginx: [alert] kill(34321, 15) failed (3: No such process)

Opened issue to track addressing this issue https://github.com/OSC/ondemand/issues/509