简体   繁体   English

Windows Azure上的MongoDB ReplicaSet-Sockect异常错误

[英]MongoDB ReplicaSet on windows azure - Sockect exception error

I have 3 node replica set deployed in windows azure. 我在Windows Azure中部署了3个节点副本集。 While doing performance testing, the test code halts after sometime. 在进行性能测试时,测试代码会在一段时间后暂停。 In the server I can see the following error log - Fri Aug 30 23:14:59.982 [conn2454] SocketException handling request, closing client connection: 9001 socket exception [SEND_ERROR] server [ip:port] For the performance test I am using multithreaded code to only read data from the replicaset. 在服务器中,我可以看到以下错误日志-Fri Aug 30 23:14:59.982 [conn2454] SocketException处理请求,正在关闭客户端连接:9001套接字异常[SEND_ERROR]服务器[ip:port]对于性能测试,我正在使用多线程代码仅从副本集中读取数据。 So far I have tried http://docs.mongodb.org/manual/faq/diagnostics/#does-tcp-keepalive-time-affect-sharded-clusters-and-replica-sets . 到目前为止,我已经尝试了http://docs.mongodb.org/manual/faq/diagnostics/#does-tcp-keepalive-time-affect-sharded-clusters-and-replica-sets But it did not help so far. 但这到目前为止没有帮助。 Any thoughts/suggestions will be welcomed. 任何想法/建议都将受到欢迎。

Thanks 谢谢

This is old, but just in case someone else stumbles across this. 这很古老,但以防万一有人偶然发现。

You need to set the TCP/IP keep alive times different from the stock Linux configuration if you are running under Azure: 如果在Azure下运行,则需要将TCP / IP保持活动时间设置为不同于常规Linux配置的时间:

echo 45 > /proc/sys/net/ipv4/tcp_keepalive_time   
echo 30 >  /proc/sys/net/ipv4/tcp_keepalive_intvl   
echo 20 >  /proc/sys/net/ipv4/tcp_keepalive_probes    

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM