Recently released a project is always disconnected for no reason, the IIS machine directly browsing will not appear in the Yellow pages, is always loaded, and finally disconnected.
Resume normal after restarting IIS.
After several times, the IIS logs and Windows logs are viewed, and an error message is found in the Windows log as follows:
<data>error connecting:timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may has occurred because all pooled connections were in use and Max pool size is reached.</data> probably Baidu a bit is the database connection pool problem, the solution is as follows:
Show variables like ' max_connections ' //show the maximum number of database connections
Set GLOBAL max_connections = $; To modify the maximum number of database connections
<add key= "Data" value= "SERVER=IP; port=3306; Uid=root; Pwd=root;database=data; pooling=true;min pool Size=5;max pool size=512;connect timeout =; "/>
I do not know whether it has been cured, but there is no problem.
MYSQL Database Connection Pool