problem that is happening is that sporadically the virtual machine loses connection with the database

Christian Palú 96 Reputation points
2021-07-15T00:25:06.117+00:00

Hi good night, my problem and the following, I'm using a mysql server (Azure Database Server for MySQL) and a virtual machine (Virtual machine with windows server 2019), in the windows server virtual machine my web application is running using IIS , this application connects with the mysql server, the problem that is happening is that sporadically the virtual machine loses connection with the database, this problem I noticed happens when the active connections in the database increase, when the problem happens I lose the connection with the database, being inside the virtual machine I can no longer access the database, after about 10 to 15 minutes it starts working again, the database and the virtual machine are in the same region and also in the same Internal network, I would like a support from you to be able to solve the problem with some urgency since all my customers are without service when the problem occurs.

Internet Information Services
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,907 questions
Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
829 questions
{count} votes

Accepted answer
  1. Christian Palú 96 Reputation points
    2021-07-15T08:24:06.957+00:00

    researching, I found that the problem may be related to Avoiding TCP/IP Port Exhaustion, I made some changes in regedit, HKEY_LM\System\CurrentControlSet\Services\Tcpip\Parameters\MaxUserPort=65535 and
    HKEY_LM\System\CurrentControlSet\Services\Tcpip\Parameters\TcpTimedWaitDelay=30, I'll be watching to see if it solves my problem

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.