[CSHARP-1934] Set TImeOut for RunCommand Created: 08/Mar/17 Updated: 27/Oct/23 Resolved: 08/Mar/17 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | API, Documentation |
| Affects Version/s: | 2.4.2 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Blocker - P1 |
| Reporter: | Ummer Irshad | Assignee: | Robert Stam |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | question | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS : Windows 7 |
||
| Description |
|
Is there any way to reduce the default command timeout of 30000ms of RunCommand in below code?
Thanks in advance. |
| Comments |
| Comment by Robert Stam [ 08/Mar/17 ] |
|
There is no way to apply a timeout to RunCommand. You could use a short ReadTimeout, but that's generally not desirable as the server won't know the client has timed out and will continue executing the operation all the way to the end anyway. When a ReadTimeout occurs the connection must be discarded, which interferes with the efficient operation of the connection pool. |