diff options
author | samantharitter <samantha.ritter@10gen.com> | 2016-10-24 11:46:55 -0400 |
---|---|---|
committer | samantharitter <samantha.ritter@10gen.com> | 2016-10-24 11:47:45 -0400 |
commit | ce95ca7f27b44e834baf2bd7d0dff53c8d09ea56 (patch) | |
tree | 5a573420da852a01a208304670f4a498498dbae9 | |
parent | d8f51ce1da816ab66c97509791a5954cf899c0ec (diff) | |
download | mongo-ce95ca7f27b44e834baf2bd7d0dff53c8d09ea56.tar.gz |
SERVER-26647 Log additional timeout information in NetworkInterfaceASIO
-rw-r--r-- | src/mongo/executor/network_interface_asio.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/executor/network_interface_asio.cpp b/src/mongo/executor/network_interface_asio.cpp index 84028a95194..d70acd649a5 100644 --- a/src/mongo/executor/network_interface_asio.cpp +++ b/src/mongo/executor/network_interface_asio.cpp @@ -259,10 +259,12 @@ void NetworkInterfaceASIO::startCommand(const TaskExecutor::CallbackHandle& cbHa // timeout duration - but make no stronger assumption. It is thus possible that // we have already exceeded the timeout. In this case we timeout the operation // manually. - return _completeOperation(op, - {ErrorCodes::ExceededTimeLimit, - "Remote command timed out while waiting to get a " - "connection from the pool."}); + std::stringstream msg; + msg << "Remote command timed out while waiting to get a connection from the " + << "pool, took " << getConnectionDuration << ", timeout was set to " + << op->_request.timeout; + auto rs = ResponseStatus(ErrorCodes::ExceededTimeLimit, msg.str()); + return _completeOperation(op, rs); } // The above conditional guarantees that the adjusted timeout will never underflow. |