[CDRIVER-112] No socket time out Created: 03/Feb/12 Updated: 03/May/17 Resolved: 23/Mar/12 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | 0.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | jitendra | Assignee: | Kyle Banker |
| Resolution: | Done | Votes: | 0 |
| Labels: | hang | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
windows 7 and 64 bit debian |
||
| Description |
|
We are using Mongo 'C' driver to insert objects in mongodb. Our problem is, the driver gets stucked indefinitely (saw for 30 mins) at recv and send socket calls. This happens when we turn off server running mongodb abruptly. |
| Comments |
| Comment by Kyle Banker [ 10/Feb/12 ] |
|
I don't see any problem with setting the socket op timeout. |
| Comment by jitendra [ 08/Feb/12 ] |
|
What is a good practice to follow in this case? |
| Comment by Kyle Banker [ 05/Feb/12 ] |
|
Are you running on Linux? If you compile like so: scons --use-platform=LINUX You'll then have socket timeout support using the following function: int mongo_set_op_timeout( mongo *conn, int millis ); See here: |