ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 5.12.0
    • None
    • 5
    • None
    • None
    • None
    • None
    • None
    • None

      Reported in https://github.com/mongodb/laravel-mongodb/issues/3665#issuecomment-6818120336

      A PHPUnit suite run in parallel (~3,500 tests) reports:

      Metric 5.11.0 5.12.0
      Test execution time ~21 min ~44 min
      Maximum MySQL connections ~15 >10,000

      The execution time is covered by PHPLARA-326. This ticket covers the connection growth.

      Diagnosis

      • The Queryable Encryption field type cache (#3645) does not open SQL connections. EncryptedFieldTypes::fieldTypesFor() only resolves the model connection, which DatabaseManager caches.
      • Connection::syncCommandSubscriber() (#3646) only touches the MongoDB client.
      • Prime suspect: #3627 (PHPLARA-148), the hybrid hasOneThrough() and hasManyThrough() relations added in 5.12.0.

      Next steps

      • Reproduce with an application that uses a through relation between a SQL model and a MongoDB model.
      • Compare the connection count on 5.11.0 and 5.12.0.
      • Disable the through relation on 5.12.0 and compare again.
      • Check whether a SQL connection is opened for each relation call and not released.

              Assignee:
              Jérôme Tamarelle
              Reporter:
              Jérôme Tamarelle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: