Details
-
Question
-
Resolution: Gone away
-
Major - P3
-
None
-
None
-
None
-
None
Description
We are seeing the following error in splunk:
error incrementing server version counter: timed out while checking out a connection from connection pool: context canceled; maxPoolSize: 40, connections in use by cursors: 0, connections in use by transactions: 0, connections in use by other operations: 40 (ProtocolErrorCode=201) |
This is for BAAS / App Services / Device Sync. There is a ton of code that we use to interface with the driver and that makes this difficult to provide a whole lot of useful information without just dumping way too much information but the summary is:
1. I am fairly certain we are not cancelling the context but it could theoretically be possible (I just would expect to see other messages if this were the case)
2. The context we pass in has a deadline of 4 minutes
3. This is happening after exactly 30 seconds
Discussion from slack:
From Benji:
That’s a WaitQueueTimeoutError that is returned during connection check out when the context is done. It wraps the underlying context error. Does the context you’re using to run operations have any sort of deadline/is there any chance you’re cancelling it within your application? Can you share the code for “incrementing server version counter”?
From Preston:
To add to Benji’s answer, it looks like this is CSOT timeout logic which uses the “context.CancelFunc” defined for “context.WithoutTimeout”. The code for that in the Go Driver is here.
https://github.com/mongodb/mongo-go-driver/blob/master/x/mongo/driver/operation.go#L338
This is not a huge issue for us but it is lightly puzzling. If you need more information please let me know and I apologize I cant provide much more detail now
Attachments
Issue Links
- is related to
-
GODRIVER-3021 Document connection pool timeout causes
-
- Backlog
-