修复Nginx日志文件过多导致Too many open files错误
Signed-off-by: HITSword <admin@huayizhiyun.com>master
parent
e4877e246d
commit
bef9a052d1
|
|
@ -20,6 +20,13 @@ function amh_module_install()
|
|||
if amh_module_status ; then
|
||||
exit;
|
||||
else
|
||||
#Fix 'Too many open files' Error
|
||||
if ! cat /etc/security/limits.conf | grep -q '* soft nofile 40960'; then
|
||||
echo '* soft nofile 40960' >> /etc/security/limits.conf;
|
||||
fi;
|
||||
if ! cat /etc/security/limits.conf | grep -q '* hard nofile 40960'; then
|
||||
echo '* hard nofile 40960' >> /etc/security/limits.conf;
|
||||
fi;
|
||||
#Delete other version
|
||||
for module_name in `ls /root/amh/modules/ | grep 'HYProxy' | grep -v 'HYProxy-1.0'`; do
|
||||
#amh module $module_name uninstall force;
|
||||
|
|
|
|||
Loading…
Reference in New Issue