Увеличить кол-во открытых файлов: различия между версиями

Материал из Webko Wiki
Перейти к навигации Перейти к поиску
 
Строка 15: Строка 15:
  
 
==apache==
 
==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

Текущая версия на 00:40, 16 ноября 2015

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