i`were delegated to manage a MySQL-Server(RHEL 7) and now i have a strange Situation. The RPM-Package is from Oracle, which is using init.d-scripts and not systemd. If i check the limits of the running MySQL-Server-Process, i get 5000. Let me show you how i checked that:
ps -ef | grep mysql | grep -v grep
root 17184 1 0 2018 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/db/data1 --pid-file=/var/run/mysqld/mysqld.pid
mysql 17902 17184 0 2018 ? 01:14:22 /usr/sbin/mysqld --basedir=/usr --datadir=/db/data1 --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysql/mysqld.err --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
cat /proc/17902/limits
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 15066 15066 processes
Max open files 5000 5000 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 15066 15066 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
As you can see, "Max open files" hard and soft limit is set to 5000. My question is: where is this value set? I have already checked the following files:
- /etc/security/limits.conf => This file is empty, except some commentaries
/etc/security/limits.d/20-nproc.conf => This is the only file under limits.d. Content:
* soft nproc 4096 root soft nproc unlimited
ulimit -n as root: 1024
ulimit -n as user mysql: 1024
/etc/my.cnf doesnt contain an max_open_files value
/etc/my.cnf.d is empty
Any idea where this value is set?