kavitha
kavitha

Reputation: 41

SQL Azure connectivity issue after concurrent connections

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.

Upvotes: 3

Views: 7913

Answers (1)

JamesKn
JamesKn

Reputation: 1045

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

Upvotes: 6

Related Questions