|Re: SocketException using C# driver on azure||craiggwilson||7/19/12 4:55 PM|
I see that you are in a cursor. How many documents are you pulling back at a time and how long does it take to iterate through them?
On Thursday, July 19, 2012 5:23:20 PM UTC-5, Keivan Beigi wrote:
|Re: SocketException using C# driver on azure||Keivan Beigi||7/19/12 7:53 PM|
It doesn't seem to be a specific call, it just fails randomly on different calls. it seems to be an intermittent connection issue.
|Re: SocketException using C# driver on azure||sridhar||7/19/12 8:37 PM|
Have you looked into this http://blogs.msdn.com/b/avkashchauhan/archive/2011/11/12/windows-azure-load-balancer-timeout-details.aspx. According to this post, it should already be fixed. One way to test if this is your issue is to change the tcp keep alive and set it to something like 30 seconds. More information on setting the tcp keep alive can be found at http://technet.microsoft.com/en-us/library/cc957548.aspx. Note since the keep alive is in milliseconds set it to 300,000. Do let us know if this helps.
|Re: [mongodb-user] Re: SocketException using C# driver on azure||Keivan Beigi||7/19/12 8:44 PM|
Should I use http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.settcpkeepalive.aspx
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com
> To unsubscribe from this group, send email to
> See also the IRC channel -- freenode.net#mongodb
|Re: [mongodb-user] Re: SocketException using C# driver on azure||Keivan Beigi||7/22/12 8:45 AM|
I tried updating the ttl on the db and app server machines, with non luck.
I also tried updating the driver's default values to these but still no help,
MongoDefaults.MaxConnectionIdleTime = TimeSpan.FromHours(1);
MongoDefaults.MaxConnectionLifeTime = TimeSpan.FromDays(1);
MongoDefaults.SocketTimeout = TimeSpan.FromSeconds(30);
|Re: [mongodb-user] Re: SocketException using C# driver on azure||Keivan Beigi||7/23/12 11:10 AM|
I think I've found the solution,
MongoDefaults.MaxConnectionIdleTime = TimeSpan.FromMinutes(1);
I think the issue is the driver trying to use connections that have been killed by azure for being idle. setting the idle time to 1 minutes fixes it, I'll try some other values to see how high i could take it without getting the socket exceptions.
|Re: [mongodb-user] Re: SocketException using C# driver on azure||sridhar||7/23/12 12:14 PM|
Thanks for working through this and the post. This is definitely something I will include on our troubleshooting section for Azure.