Open File limit per process on Redhat 8
search cancel

Open File limit per process on Redhat 8

book

Article ID: 440450

calendar_today

Updated On:

Products

Network Observability

Issue/Introduction

DX NetOps Performance Management installation documentation states that modifying /etc/security/limits․conf sets open file limits for background services on Red Hat 8.

ERROR MESSAGE: "Too many open files"

SYMPTOMS:

  • Device Manager crashes due to file descriptor limits․

  • Changes to /etc/security/limits․conf do not affect the running process limit․

  • The command ulimit -n does not reflect or impact the limit for systemd-managed services․

CONTEXT: This issue occurs on Red Hat 8 systems where services are managed by systemd, which ignores PAM-based limits․conf settings․

IMPACT: Services may crash or fail to handle network traffic when reaching the default file descriptor limit (1024)․

Environment

DX NetOps Performance Management 25.4.x

All Linux operating System versions, where PM is started using systemd instead of init scripts.

Cause

Modern Linux systems using systemd (like Red Hat 8) ignore /etc/security/limits․conf for background services․

Limits․conf only applies to interactive user login sessions managed by PAM (Pluggable Authentication Modules)․

Systemd services require the LimitNOFILE directive within their service unit configuration or an override file․

Resolution

STEPS: 1․

CREATE SYSTEMD OVERRIDE:

Use the systemd edit command to create a configuration override for the specific service․

Command:

systemctl edit [service-name]․service

Example:

systemctl edit caperfcenter_devicemanager․service

EXPECTED: An empty override file opens in the default text editor․

2․ CONFIGURE FILE LIMITS: Add the LimitNOFILE directive under the [Service] block in the override file․

Input:

[Service]

LimitNOFILE=65536

EXPECTED: The configuration sets both soft and hard limits to 65536․

3․ RELOAD AND RESTART:

Apply the changes by reloading the systemd daemon and restarting the service․

Command:

systemctl daemon-reload

systemctl restart [service-name]․service

or

systemctl daemon-reload; systemctl restart [service-name]․service

EXPECTED:

Service restarts with the new limits applied․

VERIFY SUCCESS:

1․IDENTIFY PID: Find the main Process ID of the service․

Command: systemctl show -p MainPID [service-name]․service

2․ CHECK KERNEL LIMITS: Inspect the /proc filesystem for the active limit․

Command: cat /proc/[PID]/limits | grep "Max open files"

EXPECTED: Output shows "Max open files 65536 65536"․