5

I'm running an application on appharbor.com where I'm using a database from MongoHQ.

Form time to time I see this error "Server instance penny.mongohq.com:10070 is no longer connected." on appharbor.

I have also seen some System.Net.Sockets.SocketException, "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"

Is there a way to insure that if the server is not connected then try reconnect? or to set a longer time out?

eNepper
  • 1,889
  • 2
  • 13
  • 12
  • Looking at the driver source code, it seems that the connection to the server is somehow lost: https://github.com/mongodb/mongo-csharp-driver/blob/master/Driver/Core/MongoServerInstance.cs#L275 – friism Feb 23 '12 at 21:26
  • 1
    One of our users is getting this issue too - and we are using the latest driver I believe (version 1.9.2). Are there any other things we could try to resolve this? – chrisb Jul 25 '14 at 05:48
  • I am getting the same problem after multiple queries in an environment that we have a replica set with servers living both inside and outside of Amazon. I can even call Disconnect() and .Connect() before and it still fails with this error occasionally. Happens using driver versions 1.8.3.9 and 1.9.2 – Mario Sep 22 '14 at 20:24

1 Answers1

0

I was getting the same problem with the older versions of the C# driver - they changed the connection pooling mechanism earlier in the year, though, and we've not had any issues since, so if you haven't already, it's worth checking again to see if v1.6 still has the same problem.

Richard K.
  • 2,034
  • 1
  • 14
  • 15