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

MongoDB 7.0: socketTimeout not being honored

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Execution
    • ALL
    • QE 2024-01-22, QE 2024-02-05, QE 2024-02-19

    Description

      (This ticket is related to support case https://support.mongodb.com/case/01207868)

      In our Ruby/Mongoid-based application, we set an application-wide socketTimeout value of 30 seconds. In MongoDB 6.x and prior, this was a reliable way that slow queries would be killed when the socket closed.

      Since upgrading to MongoDB 7.0.2 from 6.0.11, we have noticed many long-running queries are not killed in this manner, and instead execute indefinitely.

      The MongoDB team has suggested that this may be due to the new SBE in MongoDB 7.x “yielding less frequently” to evaluate the timeout condition.

      Moreover, we suspect there is a “death spiral” effect whereby non-killed long running queries cause less yields, causing more queries to escape the timeout kill, and so-on in a positive feedback loop. (Just a suspicion; no hard evidence for this.)

      Attachments

        Activity

          People

            rushan.chen@mongodb.com Rushan Chen
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated: