title: Azure website keeps throwing the error "An attempt was made to access a socket in a way forbidden by its access permissions"
body: <p>I have a website running as a web app on a dedicated Azure plan.   It connects to a Redis, SQL Azure and a MongoDB backend.    The website has been running fine for weeks now and then without any new code I am now getting lots of socket exceptions starting like the one below.</p>
  
  <p>An attempt was made to access a socket in a way forbidden by its access permissions.</p>
  
  <p>The website intermittently gets the error when connecting to Redis, SQL Azure and MongoDB which makes no sense.   I changed the Pricing Tier for the site which would move the website from one VM to another behind the scenes and the errors went away for a couple days and have returned again.   </p>
  
  <p>I just now changed the site from an S3 to an S2 (making it smaller) and they have gone away but I don't know for how long. How do I fix this?  Does Azure limit the number of sockets for a site?  Is there some setting on a site in Azure that could cause this?</p>