Net website error information:
Note:An error occurred while executing the current Web request. Check the stack trace information for details about the error and the source of the error in the code.
Exception details:System. invalidoperationexception: the timeout has reached. The timeout time has reached, but the connection has not been obtained from the pool. This may occur because all pool connections are in use and the maximum pool size is reached.
Source error:
An unhandled exception is generated during the execution of the current Web request. You can use the following exception stack trace information to determine the cause and location of the exception. |
"/" Indicates a server error in the application.
The timeout has reached. The timeout time has reached, but the connection has not been obtained from the pool. This may occur because all pool connections are in use and the maximum pool size is reached.
The possible reasons are as follows: concurrent operations, connection is not closed after use, or the datareader connection exclusive connection.
Solution:
1. modify several key pages or frequently accessed database access operations, and use dataadapter and dataset to obtain database data,Do not use datareader.
2. Use the data cache on the page for accessing the database. If the data on the page is not updated frequently (updated several minutes), the cache object can be used without accessing the database, this greatly reduces the number of connections.
3. modify the code and call dispose () after close.
4. We recommend that you modify Database Operations to create your own database operation proxy class, inherit from the system. idisposable interface, and forcibly release resources. In this way, there will be no insufficient connections.