[DRIVERS-1860] Avoiding a second server selection timeout when spawning mongocryptd Created: 13/Sep/19 Updated: 11/Nov/21 Resolved: 20/Oct/21 |
|
| Status: | Closed |
| Project: | Drivers |
| Component/s: | Client Side Encryption |
| Fix Version/s: | None |
| Type: | Spec Change | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
The client side encryption spec says that the driver should automatically spawn mongocryptd when it gets a server selection timeout when attempting to run a command against it. In the C# driver we have observed that it can sometimes take mongocryptd longer than 1 second to spin up, resulting in a second non-recoverable server selection timeout. The spec should state that when the driver automatically spawns mongocryptd it should verify that the process is up and running and accepting connections before attempting a second server selection against it. |
| Comments |
| Comment by Shane Harvey [ 19/Jul/21 ] |
|
DRIVERS-1387 increased the timeout from 1 second to 10 seconds. Can we close this issue now? |
| Comment by Kevin Albertson [ 21/Oct/19 ] |
|
Note, during implementation in libmongoc ( |
| Comment by Robert Stam [ 01/Oct/19 ] |
|
Note: as mentioned in the CSHARP ticket, mongocryptd actually seems to be launching very quickly (as expected). So the server selection timeouts that the C# driver is seeing could be caused by hiccups in the C# driver implementation of SDAM resulting in delays in the new mongcryptd being discovered, rather than delays in the mongocryptd process itself launching and starting to wait for connections. |