From bef9a052d1642763f7f45c8595509e329d58ac8c Mon Sep 17 00:00:00 2001 From: HITSword Date: Fri, 17 Jan 2020 16:10:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DNginx=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=BF=87=E5=A4=9A=E5=AF=BC=E8=87=B4Too=20man?= =?UTF-8?q?y=20open=20files=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: HITSword --- AMHScript | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AMHScript b/AMHScript index 696c954..8dfef43 100644 --- a/AMHScript +++ b/AMHScript @@ -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;