SQL refused connection at boot

I run a load test on my system. At a certain load level, I start getting SQL errors in my log:

System.Data.SqlClient.SqlException (0x80131904): A network-related or specific instance error occurred while establishing a connection to SQL Server. The server was not found or was not available. Verify the instance name is correct and configure SQL Server to connect remotely. (provider: Named pipes Prprovidererror: 40 - Failed to bind to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): network path not found

Running the performance monitor on the corresponding SQL server, I found the following:

  • The processor level rarely exceeds 50%. (At the previous iteration, I saw that it reached a maximum of 100%, so I increased the specifications of the virtual machine, which helped the problem increase the load level.)
  • The number of user connections has reached the shadow of more than 8000. The Sql server has a default setting of 32,767 maximum connections.
  • The connection string indicates the maximum pool size of 1000 connections to each database and the server has 100 databases. The load test is distributed randomly between 100 databases, so there should be a fairly even distribution, which means about 80 connections to the database. Nowhere near the limit of 1k.

What other factors can lead to the fact that Sql Server will cease to be able to accept connections?

: : Entity Framework Core (EF7) , .

+4
4

, SQL . API, API- , . API, " ", .

: , , .

0

" " , SQL Server. "IT Guy", , . -, - .

? IPS, , , . , , SQL Server.

+7

, . ; .

? dispose() ?

, , datacaching db? 2-5- datacache .

+1

You are using a TCP access restriction on the listen()listening port of SQL Server. When this happens, Windows platforms (but not * nix platforms) will give a “connection denied” for subsequent incoming connections.

I am not a SQL Server guy, but there will certainly be a parameter in which you can increase its listening.

Alternatively, you should look for the best or more connection pool on the client.

+1
source

Source: https://habr.com/ru/post/1665888/


All Articles