Sometimes, a web application server may stop due to an operating system restarting or crashing. Whenever a web server is killed, it is someone's job to bring it back to life. It is wonderful if that is automated. Supervisord is a tool that comes to the rescue. To make our API server run all of the time, we need to monitor it and recover it quickly. Supervisord is a generic tool that can monitor running processes (systems) and can restart them when they are terminated.
Monitoring our Go API server with Supervisord
Installing Supervisord
We can easily install Supervisord using Python's pip command.
> sudo pip install supervisor
On Ubuntu 18.04, you can also use the apt-get command:
> sudo apt-get install -y supervisor...