Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-59599

Investigate large delays in connection establishment

    XMLWordPrintable

    Details

    • Operating System:
      ALL
    • Sprint:
      Service Arch 2021-11-01
    • Linked BF Score:
      41
    • Story Points:
      6

      Description

      The following is a snippet from SpecificPool::spawnConnections that spawns new connections for connection pools:

      // spawn enough connections to satisfy open requests and minpool, while honoring maxpool
      void ConnectionPool::SpecificPool::spawnConnections() {
          ...
          for (decltype(allowance) i = 0; i < allowance; ++i) {
              OwnedConnection handle;
              try {
                  handle = _parent->_factory->makeConnection(_hostAndPort, _sslMode, _generation);
              } catch (std::system_error& e) {
                  ...
              }
              ...
              handle->setup(_parent->_controller->pendingTimeout(),
                            guardCallback([this](auto conn, auto status) {
                                finishRefresh(std::move(conn), std::move(status));
                            }),
                            _parent->getName());
          }
      }
      

      This ticket should investigate (and fix) the underlying cause for sporadic large delays (more than 50 milliseconds) in connection establishment.

      This delay can be measured by capturing current time (e.g., using _parent->_factory->now()) before calling into TLConnection::setup and before running the callback function.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              amirsaman.memaripour Amirsaman Memaripour
              Reporter:
              amirsaman.memaripour Amirsaman Memaripour
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: