Azure VM Disconnects/Crashes Randomly

John Johnson 20 Reputation points
2023-11-26T15:20:50.69+00:00

Hi! My Azure VM (Running Linux) keeps disconnecting/crashing randomly, I am using this VM for a school project and one of the components for the project was to install mysql on it. When I did that the VM started disconnecting randomly, and at this point I can barely make it past the password prompts before it disconnects again. It was disconnecting randomly before I had installed mysql as well.

Output:

[09:14:06.499] Resolver error: Error: Connecting with SSH timed out
	at g.Timeout (c:\Users\admi\.vscode\extensions\ms-vscode-remote.remote-ssh-0.108.2023110315\out\extension.js:2:642416)
	at Timeout._onTimeout (c:\Users\admi\.vscode\extensions\ms-vscode-remote.remote-ssh-0.108.2023110315\out\extension.js:2:760318)
	at listOnTimeout (node:internal/timers:569:17)
	at process.processTimers (node:internal/timers:512:7)
[09:14:06.504] ------
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,036 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dillon Silzer 57,831 Reputation points Volunteer Moderator
    2023-11-26T19:29:54.1633333+00:00

    Hi John,

    Have you tried manually restarting it from Azure UI? Navigate to your VM through the Azure UI > press Restart:

    User's image

    Also, try checking your resource health under Help > Resource health

    User's image

    Also, you might want to check your Logs through the UI to find out what is happening or if you are having a resource issue. If you have a cheaper VM, you may be pinning the resources and therefore it is kicking you off due to a lack of resources on the server.

    If you are still unsure, you could open a ticket with Azure Support (you will need a support plan):

    https://azure.microsoft.com/en-ca/support/create-ticket


    If this is helpful please accept answer.


  2. Olga Os - MSFT 5,951 Reputation points Microsoft Employee
    2023-11-27T20:53:28.63+00:00

    Hello John Johnson,

    Welcome to the MS Q&A Forum.

    There are numerous possible causes for your disconnection from the Azure VM. Based on your explanation, it appears that the current VM size does not have sufficient resources to support all the processes you are running. To address this issue, I suggest reviewing a checklist of best practices and guidelines to optimize the performance of your SQL Server on Azure Virtual Machines (VMs).

    While running SQL Server on Azure Virtual Machines, continue using the same database performance tuning options that are applicable to SQL Server in on-premises server environments. However, the performance of a relational database in a public cloud depends on many factors, such as the size of a virtual machine, and the configuration of the data disks. There's typically a trade-off between optimizing for costs and optimizing for performance. This performance best practices series is focused on getting the best performance for SQL Server on Azure Virtual Machines. If your workload is less demanding, you might not require every recommended optimization. Consider your performance needs, costs, and workload patterns as you evaluate these recommendations. Overview: Checklist: Best practices for SQL Server on Azure VMs

    Furthermore, you may consider utilizing PerfInsights on Azure VM to pinpoint the areas where resource utilization is constrained.

    PerfInsights is a self-help diagnostics tool that collects and analyzes the diagnostic data, and provides a report to help troubleshoot Windows virtual machine performance problems in Azure. PerfInsights can be run on virtual machines as a standalone tool, directly from the portal by using Performance Diagnostics for Azure virtual machines, or by installing Azure Performance Diagnostics VM Extension.

    Hope above answers your question and concern. Let me know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.

    Sincerely,
    Olga Os.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.