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

QNetworkAccessManager hoards sockets after QNetworkReply instances are destroyed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • 5.7.1, 5.9.5, 5.11.0
    • Network: Sockets
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            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