问题描述
我有一个网站作为专用 Azure 计划上的 Web 应用程序运行.它连接到 Redis、SQL Azure 和 MongoDB 后端.该网站已经运行好几个星期了,然后没有任何新代码,我现在收到很多套接字异常,如下所示.
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.
网站在连接到 Redis、SQL Azure 和 MongoDB 时间歇性地出现错误,这毫无意义.我更改了网站的定价层,这会将网站从一个虚拟机转移到另一个在幕后,错误消失了几天,然后又回来了.
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.
我刚刚将站点从 S3 更改为 S2(使其更小),它们已经消失了,但我不知道多久了.我该如何解决?Azure 是否限制站点的套接字数量?Azure 中的某个站点上是否存在可能导致此问题的某些设置?
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?
推荐答案
确实,它确实限制了套接字的数量.据我所知,这没有任何官方记录.但是,我确实在这里有一篇关于此的博客文章:http://www.freekpaans.nl/2015/08/starving-outgoing-connections-on-windows-azure-web-sites/
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/
这篇关于Azure 网站不断抛出错误“试图以访问权限禁止的方式访问套接字".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!