From 1de9cb9777516f9a9b5ae2597f7187eadc8d1c6e Mon Sep 17 00:00:00 2001 From: Hobo86 Date: Sat, 9 Jun 2018 14:35:55 +0800 Subject: [PATCH] =?UTF-8?q?Supervisord=E9=85=8D=E7=BD=AE=E5=A4=84=E7=90=86?= =?UTF-8?q?too=20many=20open=20files=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ router/api/api.go | 4 ++-- router/api/user.go | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8f70855..632dce0 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,11 @@ util 公共工具 ## Supervisord部署 ```bash +# Max open files问题,修改supervisord配置 +$ vi /etc/supervisor/supervisord.conf +[supervisord] +minfds = 10240 + $ vi /etc/supervisor/conf.d/echo-web.conf ``` diff --git a/router/api/api.go b/router/api/api.go index 5ade06a..96774f3 100644 --- a/router/api/api.go +++ b/router/api/api.go @@ -73,8 +73,8 @@ func ApiHandler(c *Context) error { return nil } -func JETTesterHandler(c echo.Context) error { - t, err := getJETToken() +func JWTTesterHandler(c echo.Context) error { + t, err := getJWTToken() if err != nil { return err } diff --git a/router/api/user.go b/router/api/user.go index 8990852..520ce7e 100644 --- a/router/api/user.go +++ b/router/api/user.go @@ -36,7 +36,7 @@ func UserHandler(c echo.Context) error { func UserLoginHandler(c echo.Context) error { - t, err := getJETToken() + t, err := getJWTToken() if err != nil { return err } @@ -56,7 +56,7 @@ func UserRegisterHandler(c echo.Context) error { return nil } -func getJETToken() (t string, e error) { +func getJWTToken() (t string, e error) { // Create token token := jwt.New(jwt.SigningMethodHS256)