I launched a VM in Azure to host my website. SSH and HTTP/HTTPS worked well. After a few hours of inactivity, the VM suddenly stopped responding to any connections including HTTP(S)/SSH.
I tried restarting the machine but still didn't work. It finally started to work again after I stopped it and started it again and with the IP address changed.
This exact same situation happened to me when using Azure a few months ago. Also, I don't see anything wrong with my configs, etc. because it had been working well with other cloud service providers. I'm currently using free tier and Standard B1ls (1 vcpus, 0.5 GiB memory).
This cached version of website seems pretty similar to my issue, but they're just telling to reboot it.
Will using higher performance VMs resolve the issue? Please help. This keeps happening and is driving me crazy for several days.
You could check the following things:
Virtual machine
|Activity log
---Event initiated by
. You could collect activity logs here.Boot diagnostics
to view the screenshot of the VM, you may see that the screenshot displays the message "Restarting", “Shutting down”, or “Stopping services”. Read the solution for this situation.For more information, you could read this DOC - Understand a system reboot for Azure VM.