Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-68639

QNetworkAccessManager hoards sockets after QNetworkReply instances are destroyed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Won't Do
    • Affects Version/s: 5.7.1, 5.9.5, 5.11.0
    • Fix Version/s: None
    • Component/s: Network: Sockets
    • Labels:
      None

      Description

      If a lot of QNAM request are performed to a different hosts (for example, for all 192.168.1.0 network), application may reach default 1024 open file handle limit on Linux, as it seems that QNAM keeps sockets even after all QNetworkReply instances are destroyed.

      It does free sockets when QNAM itself is destroyed, but if QNAM instanced is held for all application lifetime (taken from QQmlEngine::networkAccessManager() or created single instance for reuse manually), it produces undesired errors when file limit is reached.

      See attached example application to reproduce.

        Attachments

        1. qnam-sockets.zip
          2 kB
          Vincas Dargis
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              tpochep Timur Pocheptsov
              Reporter:
              talkless Vincas Dargis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes