[SERVER-24058] Connection pool asio doesn't honor setup timeouts Created: 04/May/16  Updated: 08/Jan/24  Resolved: 06/May/16

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 3.2.0
Fix Version/s: 3.2.7, 3.3.6

Type: Bug Priority: Major - P3
Reporter: Mira Carey Assignee: Mira Carey
Resolution: Done Votes: 0
Labels: code-and-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-24711 ASIO connections that have already ti... Closed
Duplicate
is duplicated by SERVER-23522 Replica set recovery doesn't happen i... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Platforms 14 (05/13/16)
Participants:
Case:

 Description   
Issue Status as of Jun 03, 2016

ISSUE SUMMARY
The connection pool supports a timeout for setup, but the glue code that attaches it to asio doesn't actually honor this timeout. This means requests may hang forever behind connect. Even a series of requests repeat this workflow (because new connections aren't created in the pool because one is connecting forever).

USER IMPACT
This issue may cause symptoms that mimic a network partition. In particular, this issue is the most likely explanation if the hosts of two replica set members can successfully ping each other, but only one mongod is able is able to receive heartbeats. This error may be logged as

[ReplicationExecutor] Error in heartbeat request to xxxx:27000; ExceededTimeLimit: Couldn't get a connection within the time limit

WORKAROUNDS
On the affected mongod execute to trigger a hostname caching refresh and re-resolved the hostname

rs.reconfig(rs.config())

AFFECTED VERSIONS
MongoDB 3.2.0 through 3.2.6

FIX VERSION
The fix is included in the 3.2.7 production release.

Original description

The connection pool supports a timeout for setup, but the glue code that attaches it to asio doesn't actually honor this timeout. In practice, this means requests can hang forever behind connect. Even a series of requests repeat this workflow (because new connections aren't created in the pool because one is connecting forever).



 Comments   
Comment by Githook User [ 10/May/16 ]

Author:

{u'username': u'hanumantmk', u'name': u'Jason Carey', u'email': u'jcarey@argv.me'}

Message: SERVER-24058 make connpool asio use setup timeouts

We were ignoring passed setup timeouts, which caused connection acquisition to hang forever in
connect if the other side didn't accept or refuse a connection.

(cherry picked from commit ca2702ed79eb5f2fe5169495557a10d0b68fd0c0)
Branch: v3.2
https://github.com/mongodb/mongo/commit/9afe9f3230eadb9d91a2866bf48023e074f76418

Comment by Githook User [ 06/May/16 ]

Author:

{u'username': u'hanumantmk', u'name': u'Jason Carey', u'email': u'jcarey@argv.me'}

Message: SERVER-24058 make connpool asio use setup timeouts

We were ignoring passed setup timeouts, which caused connection acquisition to hang forever in
connect if the other side didn't accept or refuse a connection.
Branch: master
https://github.com/mongodb/mongo/commit/ca2702ed79eb5f2fe5169495557a10d0b68fd0c0

Generated at Thu Feb 08 04:05:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.