camaron
02/12/2016, 09:00
Gracias por todo davidlig, está todo correcto, erra un error de sintaxis mio cuando hacía el cat.
http://zipindo.com/consola.png
http://zipindo.com/consola.png
cat /proc//limits
cat /proc/6118/limits
root@testdeb:~# cat /proc/$(cat /var/run/mysqld/mysqld.pid)/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 3935 3935 processes Max open files 1024 4096 files Max locked memory 65536 65536 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 3935 3935 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0 Max realtime timeout unlimited unlimited us root@testdeb:~# uname -a Linux testdeb 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux root@testdeb:~# cat /etc/debian_version 8.6 root@testdeb:~# nano /etc/security/limits.conf root@testdeb:~# reboot login as: root root@192.168.0.68's password: The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Mon Nov 28 11:29:46 2016 from 192.168.0.43 root@testdeb:~# mkdir -p /etc/systemd/system/mysql.service.d/ root@testdeb:~# nano /etc/systemd/system/mysql.service.d/limits.conf root@testdeb:~# systemctl daemon-reload root@testdeb:~# /etc/init.d/mysql restart [ ok ] Restarting mysql (via systemctl): mysql.service. root@testdeb:~# /etc/init.d/mysql status ● mysql.service - LSB: Start and stop the mysql database server daemon Loaded: loaded (/etc/init.d/mysql) Drop-In: /etc/systemd/system/mysql.service.d └─limits.conf Active: active (running) since lun 2016-11-28 11:35:29 CET; 4min 47s ago Process: 1249 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS) Process: 1283 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS) CGroup: /system.slice/mysql.service ├─1310 /bin/sh /usr/bin/mysqld_safe └─1662 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock... nov 28 11:35:29 testdeb mysql[1283]: Starting MySQL database server: mysqld .. nov 28 11:35:29 testdeb mysql[1283]: Checking for tables which need an upgrade, are corrupt or were nov 28 11:35:29 testdeb mysql[1283]: not closed cleanly.. nov 28 11:35:29 testdeb systemd[1]: Started LSB: Start and stop the mysql database server daemon. nov 28 11:35:29 testdeb /etc/mysql/debian-start[1752]: Triggering myisam-recover for all MyISAM tables root@testdeb:~# cat /proc/$(cat /var/run/mysqld/mysqld.pid)/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 3935 3935 processes Max open files 65536 65536 files Max locked memory 65536 65536 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 3935 3935 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0 Max realtime timeout unlimited unlimited us
mysql soft nofile 65535 mysql hard nofile 65535
reboot
mkdir -p /etc/systemd/system/mysql.service.d/ nano /etc/systemd/system/mysql.service.d/limits.conf
[Service] LimitNOFILE=infinity
systemctl daemon-reload /etc/init.d/mysql restart
cat /proc/$(cat /var/run/mysqld/mysqld.pid)/limits
Max open files 65536 65536 files