I have a Asp.Net MVC 4 application (with Entity Framework and SQL Server) that works normally on my application server, but now I had to work with redundancy and load balance with two new servers for the application (discarding the old one). On each server I followed the basics by installing all the necessary resources and configuring the application in IIS. The database is on a separate server and has not changed.
After starting the first new server, I tested the application that worked perfectly, but when I started the second new server and started the tests, I received the following error:
The transport-level error has occurred when receiving results from the server. (provider: Session Provider, error: 19 - Physical connection is not usable)
Description : An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code
Exception Details : System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: Session Provider, error: 19 - Physical connection is not usable)
I researched and found this Microsoft article , where I am based to credit that the problem is related to connection pooling.
Some doubts have arisen:
1- Is connection pooling controlled by the ADO.Net of the Database server or by each of the application servers?
2- What are the possible causes of the problem?
3- How can I solve it? Any setting like 'Connection Lifetime'
and 'Max Pool Size'
on Web.config
? (What do these settings do and why are they a possible solution?)