The issue arised due to the server having default timeout making it inaccessible when a client tries to communicate with it.
After analysing the error nginx error logs,I realised that the server had slept due to 20 mins of inactivity. This made the error when a client tried to communicate with it. I had to create a puppet script that would start a cron job to allow ensure that the web service is active every 15 mins to avoid such a down time.
At the time of this downtime, only one web server was serving the site constituting a single point of failure (SPOF). Hence, a good preventive measure and recommendation will be to use a load balancer to distribute the traffic on multiple servers to prevent a total downtime when one server is down.
Thank you for reading my article.