MySQL and max_open_files issue

Issues related to applications and software problems
Post Reply
berekin
Posts: 1
Joined: 2014/11/11 19:30:31

MySQL and max_open_files issue

Post by berekin » 2014/11/11 19:43:46

Hi all,

i have installed Centos 7 when i start MySQL server there are some warnigns in log files..

141111 20:08:27 mysqld_safe Starting mysqld daemon with databases from /home/mysql
2014-11-11 20:08:27 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-11-11 20:08:27 1903 [Warning] Buffered warning: Could not increase number of max_open_files to more than 1024 (request: 65535)

2014-11-11 20:08:27 1903 [Warning] Buffered warning: Changed limits: table_cache: 431 (requested 2000)


[root@tsv3-mysql ~]# ulimit -a mysql
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 118920
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65535
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 65535
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

my /etc/security/limits.conf looks like this

* soft nproc 65535
* hard nproc 65535
* soft nofile 65535
* hard nofile 65535

mysql soft nofile 65535
mysql hard nofile 65535


mysql version is

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.21 MySQL Community Server (GPL)

uname -a
Linux test-mysql 3.10.0-123.9.3.el7.x86_64 #1 SMP Thu Nov 6 15:06:03 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


Can you please help? I have read about this issue on the internet and it looks like there is a bug in Cetnos..

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: MySQL and max_open_files issue

Post by avij » 2014/11/11 19:56:34

Does this happen on CentOS-provided mariadb as well?

No, this is not a support forum for third party software, sorry.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: MySQL and max_open_files issue

Post by gerald_clark » 2014/11/11 19:58:10

CentOS 7 comes with MariaDB, not MySQL.
You will need to get support from the people that supplied your MySQL.

dpasqua
Posts: 1
Joined: 2014/11/17 19:32:33

Re: MySQL and max_open_files issue

Post by dpasqua » 2014/11/17 19:41:12

Hi,

Edit file /usr/lib/systemd/system/mysqld.service

Add at end:

LimitNOFILE=65535
LimitNPROC=65535

Save file and exexute:
# systemctl daemon-reload

Restart mysql:
# service mysqld restart

Best regards

Post Reply