Azure SQL server max pool size was reached error

ぐ巨炮叔叔 提交于 2019-12-05 10:23:41
  1. These queries must be running long enough in SQL DB so that the connections are exhausted. Look at the sys.dm_exeC_requests and / or sys.dm_exec_connections to see how many are opened for 40 users test. The slow queries could also be because of the resource limits you are hitting on S2 tier. Look at the sys.resource_stats view to see if you are hitting any resource limits. If that is the case scaling up may help your problem.

  2. Make sure you explicitly open and close your connections so that .Net can manage your connections

  3. Set Max Pool Size in connection string to larger value

Do your users connect directly do the database (from some desktop client app perhaps)? Because if we are talking about web application backing 200 concurrent users, that does NOT mean you need 200 concurrent connections to database to serve them - it is quite possible to serve 200 users with 1-2 connections. Reaching connection pool limit almost always mean, that you just dont close your connections (they are not physically closed, they are returned to connection pool and mark as available, when you call Close() on SqlConnection. I am not familiar with the stress testing tool you are using, but this can be the case.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!