将Azure Web App连接到Azure VM上托管的MongoDb时,我遇到了一些超时问题.
2015-12-19T15:57:47.330+0100 I NETWORK Socket recv() errno:10060 A connection attempt
failed because the connected party did not properly respond after a period of time,
or established connection failed because connected host has failed to respond.
2015-12-19T15:57:47.343+0100 I NETWORK SocketException: remote: 104.45.x.x:27017 error:
9001 socket exception [RECV_ERROR] server [104.45.x.x:27017]
2015-12-19T15:57:47.350+0100 I NETWORK DBClientCursor::init call() failed
Run Code Online (Sandbox Code Playgroud)
目前mongodb配置在单个服务器上(仅适用于dev),并通过公共IP公开.网站使用azure域名(*.westeurope.cloudapp.azure.com)连接到它,没有虚拟网络.
通常一切都运行良好,但在几分钟不活动后,我得到超时异常.从我的PC上使用MongoDb shell时会发生同样的情况,所以我很确定这是mongodb方面的一个问题.
我错过了一些配置?
azure mongodb azure-virtual-machine azure-virtual-network mongodb-.net-driver