并发连接后SQL Azure的连接问题 [英] SQL Azure connectivity issue after concurrent connections

查看:328
本文介绍了并发连接后SQL Azure的连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是那里可以在SQL Azure数据库建立的并发连接数的限制。
这是我面临的形势:
我有一个托管的Windows服务器2008 R2的虚拟机上,许多用户将连接且该数据库在SQL Azure中创建了一个网站。
我们观察到,当有太多的并发连接,还有一个连接丢失意味着使用正确的用户名和密码的网站的任何进一步的连接无法登录。没有用户将能够登录到网站ATLEAST 40分钟后,相同的用户名和密码成功登录的用户到网站。

这是节流问题还是什么,当有多个用户试图登录并执行多个耗时活动实际情况。
那是什么我可以采取的解决这个问题的步骤。请问多个用户打开从而导致会话这个error.can请你告诉我确切的事情,我需要避免这种情况的步骤。


解决方案

有是一个数据库连接180的硬性限制。如果您例如在地方,当你开始得到此限制已经得到重试框架也,你会看到,因为它尝试的重试创建到SQL Azure的更多的连接情况变得更糟,增加您的问题。

您将开始看到这样的错误:

异常类型信息:System.Data.SqlClient.SqlException
资源ID:1.数据库的请求限制为180°,已经达到了。参见 http://go.microsoft.com/fwlink/?LinkId=267637 寻求帮助。

<一个href=\"http://social.technet.microsoft.com/wiki/contents/articles/1541.windows-azure-sql-database-connection-management.aspx#Throttling_Limits\" rel=\"nofollow\">http://social.technet.microsoft.com/wiki/contents/articles/1541.windows-azure-sql-database-connection-management.aspx#Throttling_Limits

这个最快的修复是尝试和缓存的东西很多,并使用您的连接字符串最大池的限制,如果你有很多计算的前面去尝试。 (虽然这听起来像你没有)

在Azure中

另一种方式来解决这个问题是分片数据库,如果你不能高速缓存降低连接限制,我会推荐这样做一个自定义的过程,而不是使用联邦更多的控制。

要得到一个想法还你没有连接泄漏,看看是怎么回事我会看的这个资源

HTHS,

詹姆斯

is there any limit on the number of concurrent connections that can be established on SQL azure database. this is the situation that i am facing: i have a website which is hosted on a Windows server 2008 R2 virtual machine to which many users will connect and the database is created in SQL azure. we have observed that when there are too many concurrent connections, there is a connection loss meaning any further connections with the correct usernames and passwords to the website fail to login. no user will be able to login to the website for atleast 40 minutes after which the same usernames and passwords successfully log the users into the website.

is this throttling issue or what actually happens when multiple users try to login and perform multiple time consuming activities. what is the step that i can take to resolve this issue. does the session the multiple users open causing this error.can you please tell me the exact thing and the steps i need to take to avoid such a situation.

解决方案

There is a hard limit of 180 connections on a database. If you for example have got a retry framework also in place when you start to get to this limit you will see the situation get worse as it try's to retry creating more connections to SQL Azure, increasing your issue.

You will start to see errors like this :

Exception Type: System.Data.SqlClient.SqlException Resource ID : 1. The request limit for the database is 180 and has been reached. See 'http://go.microsoft.com/fwlink/?LinkId=267637' for assistance.

http://social.technet.microsoft.com/wiki/contents/articles/1541.windows-azure-sql-database-connection-management.aspx#Throttling_Limits

The quickest fixes for this is to try and cache lots of stuff and to try using a max pool limit on your connection string if you had lots of compute in front. (Although it sounds like you don't)

Caching in Azure

The other way to fix this issue is to shard your databases if you cannot lower your connection limits through cache, and I would recommend doing this a custom process rather than use federation for more control.

To get an idea also that you don't have a connection leak and to see what is going on I would look at this resource.

hths,

James

这篇关于并发连接后SQL Azure的连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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