Azure website keeps throwing the error “An attempt was made to access a socket in a way forbidden by its access permissions”

无人久伴 提交于 2019-12-10 00:57:02

问题


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.

An attempt was made to access a socket in a way forbidden by its access permissions.

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.

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?


回答1:


Indeed, it does limit the amount of sockets. As far as I know, this isn't documented anywhere official. I do, however, have a blog post on this here: http://www.freekpaans.nl/2015/08/starving-outgoing-connections-on-windows-azure-web-sites/




回答2:


I was getting the same error in the last few weeks. To fix that i deleted my website from azure and i redeployed using a different name. I know it is weird but when i deleted from azure and redeployed using the same name i got the same error again.



来源:https://stackoverflow.com/questions/30483412/azure-website-keeps-throwing-the-error-an-attempt-was-made-to-access-a-socket-i

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