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

QNetworkAccessManager hoards sockets after QNetworkReply instances are destroyed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.7.1, 5.9.5, 5.11.0
    • Network: Sockets
    • None

      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.

        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.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes