When a site is linked to a database with a large number of users, if the previous connection does not commit a transaction, it is possible that the next connection will experience a failure to access the database because the last connected transaction did not commit. Microsoft's SQL Server Client programming interface: The mechanism of connection pooling is supported by ADO and ADO. The error message may be "All connection pools are in use and the maximum pool size is reached".
Workaround:
1. If it is ODBC, it can be changed manually in ODBC. Select "Pool connetions to this drive" (connect to the driver using the pool) and change the time below to a larger point.
2. If the shared connection is SqlConnection, specify a value for the ConnectionString property connection lifetime numeric name, which by default is 0, indicating that the connection will never be automatically moved from the pool. If a different value is specified, once the connection is returned to the pool, the value is compared to the time the connection was created and the current time. If the lifetime exceeds the value of connection lifetime, then the connection is removed from the pool. Add the following code after the connection string: enlist=true; Pooling=true; Max Pool size=300; Min Pool size=0; Connection Lifetime=300;user id=sa;packet size=1000 Packet The size parameter takes any integer value from 512 to 32767.
3, DataReader is exclusive connection, when the number of links exceeds the maximum limit of DataReader, there will be problems.
SQL Server handles connection pooling issues