Hello, @Xue !
Why am I suddenly experiencing intermittent connection loss on my VM?
There are a large number of issues that could cause this (network configurations, network issues, software conflicts, hardware limitations, and more) but the fact that this VM has worked without issue in the past and that no configuration changes have been made will help in narrowing down the list of troubleshooting steps although ultimately a network trace may be needed:
- SNAT port exhaustion: In some scenarios, the VM is placed behind a load balance solution that has a dependency on resources outside of Azure. In these scenarios, if you experience intermittent connection problems, the problem may be caused by SNAT port exhaustion. To resolve the issue, create a VIP (or ILPIP for classic) for each VM that is behind the load balancer and secure with NSG or ACL.
- TCP Connection Limit: There's a limit on the number of outbound connections that can be made. The limit on outbound connections is associated with the size of the worker used.
- RDP Listener Not Properly Configured: You may face intermittent RDP connectivity problems during your sessions. You can initially connect to the VM, but then the connection drops. This problem may occur if the RDP Listener is misconfigured. Typically, this problem occurs on a VM that uses a custom image.
- High Resource Use on VM: Performance issues occur in different operating systems or applications, and every issue requires a unique approach to troubleshoot. Most of these issues revolve around CPU, Memory, Networking, and input/output (I/O) as key locations where the issue occurs. Each of these areas generates different symptoms (sometimes simultaneously) and requires a different diagnosis and solution.
If those troubleshooting steps don't resolve the issue, then you'll likely want to take a closer look at the network traffic on the VM to establish exactly where you are running into issue. These are the most common troubleshooting guides although there are more here that may be useful:
- Troubleshooting connectivity problems between Azure VMs
- Configure and validate virtual network or VPN connections
- Test network latency between Azure VMs
- Test VM network throughput by using NTTTCP
Hopefully this is useful! If you've completed all of the troubleshooting steps and are still running into issues, let us know in the comments so we can continue to troubleshoot this.
Your feedback is important so please take a moment to accept answers.
If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!