Skip to content

Potential file descriptor leak: "too many open files" error from /proc after long runtime #348

@angry-tony

Description

@angry-tony

Hi,

We’ve encountered a recurring issue with process-exporter that seems related to file descriptor exhaustion. After running the exporter continuously for several months, we observe a gradual increase in open file descriptors until it eventually fails with the following error in /var/log/messages:
process-exporter[890828]: 2025/05/22 22:21:23 error reading procs: Error reading procs: Error reading procs: open /proc: too many open files

Has anyone experienced a similar issue and found a solution? Is there any known fix or workaround for this problem?

Environment & Configuration
process-exporter version: process-exporter-0.8.4-1.x86_64
OS: rocky linux 9.1 5.14.0-162.23.1.el9_1.x86_64
Service configuration is based on the official unit file from the repo:
https://github.com/ncabatoff/process-exporter/blob/master/packaging/process-exporter.service

Executed as root user
No custom changes to how /proc is accessed

System Limits
We're running the process as root, and confirmed via ulimit -a that the open file limit is quite generous:

open files (-n) 1000000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions