Azure的SQL服务器最大池大小达到了错误 [英] Azure SQL server max pool size was reached error

查看:206
本文介绍了Azure的SQL服务器最大池大小达到了错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有湛蓝的SQL Server,同时连接超过40,我们得到如下的错误并发用户。


  

超时过期。超时时间已过获取之前
  从池中的连接。出现这种情况可能是因为所有池
  连接正在使用,并且达到最大池大小。


虽然做负载测试,我们得到error.we使用工具直接执行存储过程([的 http://www.datamanipulation.net/sqlquerystress/] [1] )。为单个用户存储过程将在1秒返回结果。

有关湛蓝的硬件细节的标准服务层和S2(50DTU)性能水平。数据库大小为705 MB。

我们都恢复本地P​​C相同的数据库。我们在本地使用SQL Server 2014年的前preSS版。使用这个工具,我们有200连接成功的用户。

如何我们达到湛蓝的200个并发用户?
我想AP preciate您的宝贵意见。


解决方案

  1. 这些查询必须足够长,SQL数据库,这样的连接耗尽运行。看sys.dm_exec_requests视图和/或sys.dm_exec_connections,看看有多少被打开了40个用户测试。慢查询也可能是因为你打在S2层上的资源限制。看sys.resource_stats查看,看看你打任何资源限制。如果这是扩大可以帮助你的问题的情况下。


  2. 请确保你明确地打开和关闭您的连接,这样的.Net可以管理您的连接


  3. 设置最大池大小的连接字符串值越大,


We have azure sql server, while connecting more than 40 concurrent users we getting below error.

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

While doing the load test we getting the error.we directly executing a stored procedure using a tool([http://www.datamanipulation.net/sqlquerystress/][1]). For a single user stored procedure will return the result in 1 sec.

Hardware details for azure is Standard SERVICE TIERS and s2(50DTU) PERFORMANCE LEVEL. Database size is 705 MB.

We are restore the same database in local pc. Locally we are using SQL Server 2014 express edition. Using this tool we have connect 200 users successfully.

How to we achieve 200 concurrent users in azure? I would appreciate for your valuable comments.

解决方案

  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

这篇关于Azure的SQL服务器最大池大小达到了错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆