Увеличить кол-во открытых файлов

Материал из Webko Wiki
Версия от 00:40, 16 ноября 2015; Sol (обсуждение | вклад) (→‎apache)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к навигации Перейти к поиску

OS

nano /etc/sysctl.conf

fs.file-max = 999999

nano /etc/security/limits.conf

* - nofile 999999

и команду в консоли

ulimit -n 999999

nginx

/etc/default/nginx добавить строки:

ulimit -n 128186 
ulimit -p 128186

apache

/etc/apache2/envvars добавить/изменить строку:

## If you need a higher file descriptor limit, uncomment and adjust the 
## following line (default is 8192): 
APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'

также можно добавить в скрипт запуска apache: /etc/init.d/apache2

добавить:

ulimit -n 65536