ExportXMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Trivial
    • None
    • Affects Version/s: 7.0.29
    • Component/s: Proxy (P)
    • None
    • Environment:

      Steps to reproduce:

      1. Run Zabbix Proxy 7.0.29 in Docker.
      2. Configure hosts monitored by the proxy with HTTP agent items.
      3. Let the proxy run normally.
      4. Observe the file descriptor count of the HTTP agent poller process:

         PID=$(docker top zabbix-proxy-nuernberg -eo pid,args | awk '/http agent poller #1/ {print $1}')
         ls /proc/$PID/fd | wc -l

      5. The number of open file descriptors continuously increases over time.
      6. Eventually the process reaches the default soft nofile limit of 1024.
      7. HTTP agent items then stop working.

      Result:

      At failure time:

      Total file descriptors: 1024
      Socket descriptors: 1007
      TCP socket descriptors: 1003

      The HTTP agent poller process still reports:

      http agent poller #1 [... awaiting 0]

      However, strace shows that new sockets cannot be created:

      socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_TCP)
      = -1 EMFILE (Too many open files)

      socket(AF_INET, SOCK_DGRAM, IPPROTO_IP)
      = -1 EMFILE (Too many open files)

      The affected HTTP agent item then reports:

      Cannot perform request: Failed to connect to <target>:80 after 0 ms: Could not connect to server

      No TCP SYN packet is sent to the target because socket() already fails locally.

      The target itself is reachable from inside the same Zabbix proxy container:

      curl http://<target>/rpc/Shelly.GetStatus
      HTTP 200

      Restarting the Zabbix proxy container immediately restores all HTTP agent checks and resets the file descriptor usage. After restart, the file descriptor count starts continuously increasing again.

      The same behavior was reproduced on Zabbix Proxy 7.0.28 and 7.0.29.

      Expected:

      The HTTP agent poller should close unused TCP sockets/file descriptors. File descriptor usage should remain stable when there are no pending HTTP requests.

      Additional observations:

      • HTTP agent poller reports "awaiting 0" while more than 1000 TCP socket file descriptors remain open.
      • Direct curl from the same Docker container to the same HTTP endpoint works.
      • Restarting the proxy immediately resolves the issue temporarily.
      • Increasing the Docker nofile limit from 1024 to 65536 works as a temporary workaround, but the descriptor count continues to increase.

            Assignee:
            Michal Laga
            Reporter:
            Silas
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: