[CDRIVER-1071] Failed to read 4 bytes from socket within 300000 milliseconds. Created: 25/Jan/16  Updated: 03/May/17  Resolved: 25/Jan/16

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 1.3.1
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: tianlei.shi Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When I send a remove command(which will execute for more than 10 mins) to mongodb, I receive this error msg.



 Comments   
Comment by A. Jesse Jiryu Davis [ 25/Jan/16 ]

Hi, please set your socketTimeoutMS to a very large number, larger than 10 minutes in milliseconds, in order to avoid this error message. More info about setting connect options:

http://api.mongodb.org/c/current/mongoc_uri_t.html#conn-options

Example:

/* 20 minutes */
mongoc_client_new ("mongodb://host-name/?socketTimeoutMS=1200000");

Generated at Wed Feb 07 21:11:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.