[CSHARP-343] .Net Web App via C# driver reports connection problems Created: 18/Oct/11 Updated: 02/Apr/15 Resolved: 20/Feb/12 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.1 |
| Fix Version/s: | 1.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dan Pinkard | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 1 |
| Labels: | driver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows Server 2008R2 Datacenter (EC2) running IIS7 |
||
| Issue Links: |
|
||||||||
| Description |
|
Two symptoms, potentially linked:
This is resolved by resetting the app-pool for that site on that host. No specific trigger is found on the servers themselves in either the mongodb.log files nor from other system monitoring tools.
This is again resolved by an app-pool reset. In both cases the evidence points more to the driver, however we would like to know how to go about directing ourselves in one direction or another. A problem local to one server doesn't feel like a server issues, however a problem shared among several could be. |
| Comments |
| Comment by Robert Stam [ 05/Mar/12 ] |
|
|
| Comment by Robert Stam [ 20/Feb/12 ] |
|
The "Timeout waiting for a MongoConnection" could happen after time due to a bug in the 1.2 version of the driver. The IOException is caused by a timeout waiting for a response from the server. The default timeout is 30 seconds, so if you are getting timeouts it means some queries are taking longer than 30 seconds. I have also seen this exception happen when you configure the socketTimeout to a value that is too short. I am closing this issue because I believe that it only affects version 1.2 and not the latest version of the driver. |
| Comment by Dan Pinkard [ 20/Oct/11 ] |
|
Correction: We are on the 1.2 driver. |
| Comment by Dan Pinkard [ 18/Oct/11 ] |
|
Will investigate moving up to 1.2. We are using the default connection pool size, however I am not sure how many threads are drawing from it. It would be nice for the driver and/or application can bubble up the IP of the offending server(s), but I'm not sure who is dropping that at the moment. |
| Comment by Robert Stam [ 18/Oct/11 ] |
|
v1.1 of the C# driver is one release back. Any chance you could upgrade to v1.2? Both exceptions are symptoms of the server not responding quickly enough. The first exception occurs because the driver times out waiting for a connection from the connection pool. How many threads do you have? When queries are slow then connections are also slow to be returned to the connection pool, which can lead to this exception. The default connection pool size is 100. The second exception occurs when the driver does not receive a response from the server within the timeout period (default is 30 seconds). I can't tell from the exceptions alone whether the driver has any role to play in the poor performance or not. v1.1 of the driver did have a negative feedback loop where once errors started occurring they got worse (see |