Hi @Vijay Kumar ,
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Error Number: 5
The timeout expired. The timeout expired prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached
When you open an SQL Connection object, it always takes from an available pool of connections. When you close the connection, ASP.NETwill release the connection to the pool of connections so that next connection object can use it.If you open connections with out closing them and when the pool reaches maximum connections, it will throw the specified error. Make sure you are not opening connection inside loop, if you open connection make sure you are closing it immedietly after you execute the query.
The reason for the error is that the connections in the connection pool are used up. When a subsequent request establishes a database connection, there are no available resources (connections) in the connection pool, so they are allocated to the queue waiting for the connection pool allocation, and the waiting time exceeds the parameter“Connection Timeout”This exception is thrown.
increase the Connection and Command Timeout values to compensate and add code to your exception handlers to deal with this contingency.
https://stackoverflow.com/questions/670774/how-can-i-solve-a-connection-pool-problem-between-asp-net-and-sql-server
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible.
If the device is in a workgroup, the device name isn't recognized by SQL Server.
If the device is in a domain, TCP/IP connections aren't enabled (Movere doesn't connect over named pipes).-us
For domain devices, enable TCP/IP connections. For workgroups, follow this article.
Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.
there is a related issue you can refer to:https://stackoverflow.com/questions/26340644/sql-server-pre-login-handshake
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.