I have a React app deployed on Ubuntu and using Nginx. Sporadically the app will crash because of nginx handshake fails which have proven really hard to debbug. Everytime this happens, I have to go on the server and restart nginx manually.
Is there a way to restart nginx automatically when the handshake error happens without the website crashing? Where would I go to check that configuration?