From e8ef54f640bdea6e1a719d3f81c1cb6f9b7968db Mon Sep 17 00:00:00 2001 From: Peter Stadler Date: Mon, 4 May 2020 21:57:43 +0200 Subject: [PATCH] uwsgi: make luci-webui single threaded and log more More threads can lead to a problem if a luci-app makes a fork (e.g. for executing a command). Parallelism is still achieved by using `processes = 3`. Make the log more verbose by filtering only standard messages for start/stop/reload out (leaving one line each). Signed-off-by: Peter Stadler --- net/uwsgi/Makefile | 2 +- net/uwsgi/files-luci-support/luci-webui.ini | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/net/uwsgi/Makefile b/net/uwsgi/Makefile index cc9f2f204..97152267f 100644 --- a/net/uwsgi/Makefile +++ b/net/uwsgi/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uwsgi PKG_VERSION:=2.0.18 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583 diff --git a/net/uwsgi/files-luci-support/luci-webui.ini b/net/uwsgi/files-luci-support/luci-webui.ini index 307d0346e..eb984b312 100644 --- a/net/uwsgi/files-luci-support/luci-webui.ini +++ b/net/uwsgi/files-luci-support/luci-webui.ini @@ -21,11 +21,12 @@ socket-timeout = 120 thunder-lock = true plugin = syslog logger = luci syslog:uwsgi-luci -log-route = luci luci: +; the regular expression leaves for successful de/activation only one line each: +log-route = luci ^(?!... Starting uWSGI |compiled with version: |os: Linux|nodename: |machine: |clock source: |pcre jit |detected number of CPU cores: |current working directory: |detected binary path: |uWSGI running as root, you can use |... WARNING: you are running uWSGI as root |chdir.. to |your processes number limit is |limiting address space of processes...|your process address space limit is |your memory page size is |detected max file descriptor number: |lock engine: |thunder lock: |uwsgi socket |your server socket listen backlog is limited to |your mercy for graceful operations on workers is |mapped .* bytes |... Operational MODE: |initialized CGI path: |... no app loaded. going in full dynamic mode ...|... uWSGI is running in multiple interpreter mode ...|spawned uWSGI worker |announcing my loyalty to the Emperor...|workers have been inactive for more than |SIGINT/SIGQUIT received...killing workers...|worker .* buried |goodbye to uWSGI.|...gracefully killing workers...|Gracefully killing worker|worker .* killed successfully) disable-logging = true req-logger = syslog:uwsgi-luci log-format=%(method) %(uri) => return %(status) (%(rsize) bytes in %(msecs) ms) -threads = 3 +threads = 1 processes = 3 cheaper-algo = spare cheaper = 1