You are here
Increase file limit of a running process
Fri, 2020-06-19 18:53 — Shinguz
Asking stupid questions and googling for them is fun some times...
Today I was asking myself if one could rise the file limit for a running MariaDB mysqld process online without restarting the database instance?
And I found an answer on serverfault: Set max file limit on a running process:
PID=$(pidof mysqld)
grep -e 'Max open files' -e Limit /proc/${PID}/limits
Limit Soft Limit Hard Limit Units
Max open files 1024 4096 files
prlimit --pid $PID | grep -e NOFILE -e DESC
RESOURCE DESCRIPTION SOFT HARD UNITS
NOFILE max number of open files 1024 4096 files
prlimit --nofile --output RESOURCE,SOFT,HARD --pid ${PID}
RESOURCE SOFT HARD
NOFILE 1024 4096
sudo prlimit --nofile=2048:8192 --pid ${PID}
prlimit --nofile --output RESOURCE,SOFT,HARD --pid ${PID}
RESOURCE SOFT HARD
NOFILE 2048 8192
Literature
See also:
Taxonomy upgrade extras:
- Shinguz's blog
- Log in or register to post comments