[Bug] uwsgi-luci: 启动时报 invalid cheaper-initial value 警告日志
环境信息
- 设备型号:NanoPi R5S (RK3568)
- 固件版本:OpenWrt 25.12.5 (r33051-f5dae5ece4) / 内核 6.18.52 aarch64
- 涉及组件:uwsgi-luci-support
问题描述 当通过浏览器访问或刷新 LuCI Web 界面(触发 uWSGI 按需唤醒启动)时,系统日志中频繁出现以下 Warning 警告:
daemon.info: uwsgi-luci: warning: invalid cheaper-initial value (1), must be equal or higher than cheaper (2), using 2 as initial number of workers daemon.info: uwsgi-luci: spawned uWSGI master process (pid: xxxxx)
原因分析 在 /etc/uwsgi/vassals/luci-webui.ini 中,固件优化了并发与工作进程参数,将保底进程数 cheaper 提高到了 2,但未同步修改初始启动进程数 cheaper-initial(仍保留为 1):
threads = 2 processes = 4 cheaper-algo = spare cheaper = 2 cheaper-initial = 1 <--- 此处为 1 cheaper-step = 1 master = true idle = 360
根据 uWSGI 的规范,cheaper-initial(初始工作进程数)不能小于 cheaper(最低保底进程数)。 每次 uWSGI 启动校验时发现 cheaper-initial(1) < cheaper(2),就会打印警告并强制回退使用 2。
修复建议 在固件打包/源码中的 luci-webui.ini 文件中,将 cheaper-initial 同步修改为 2:
--- a/etc/uwsgi/vassals/luci-webui.ini +++ b/etc/uwsgi/vassals/luci-webui.ini @@ -35,7 +35,7 @@ threads = 2 processes = 4 cheaper-algo = spare cheaper = 2 -cheaper-initial = 1 +cheaper-initial = 2 cheaper-step = 1 master = true
验证结果 修改为 cheaper-initial = 2 并重启 uwsgi 后,日志中该条 warning 警告彻底消失,每次拉起直接正常输出: daemon.info uwsgi-luci: spawned uWSGI master process (pid: xxxxx)
好
发自我的iPhone
在 2026年10月5日,14:14,akapzg @.***> 写道:
akapzg created an issue (sbwml/builder#98) 环境信息
设备型号:NanoPi R5S (RK3568) 固件版本:OpenWrt 25.12.5 (r33051-f5dae5ece4) / 内核 6.18.52 aarch64 涉及组件:uwsgi-luci-support 问题描述 当通过浏览器访问或刷新 LuCI Web 界面(触发 uWSGI 按需唤醒启动)时,系统日志中频繁出现以下 Warning 警告:
daemon.info: uwsgi-luci: warning: invalid cheaper-initial value (1), must be equal or higher than cheaper (2), using 2 as initial number of workers daemon.info: uwsgi-luci: spawned uWSGI master process (pid: xxxxx)
原因分析 在 /etc/uwsgi/vassals/luci-webui.ini 中,固件优化了并发与工作进程参数,将保底进程数 cheaper 提高到了 2,但未同步修改初始启动进程数 cheaper-initial(仍保留为 1):
threads = 2 processes = 4 cheaper-algo = spare cheaper = 2 cheaper-initial = 1 <--- 此处为 1 cheaper-step = 1 master = true idle = 360
根据 uWSGI 的规范,cheaper-initial(初始工作进程数)不能小于 cheaper(最低保底进程数)。 每次 uWSGI 启动校验时发现 cheaper-initial(1) < cheaper(2),就会打印警告并强制回退使用 2。
修复建议 在固件打包/源码中的 luci-webui.ini 文件中,将 cheaper-initial 同步修改为 2:
--- a/etc/uwsgi/vassals/luci-webui.ini +++ b/etc/uwsgi/vassals/luci-webui.ini @@ -35,7 +35,7 @@ threads = 2 processes = 4 cheaper-algo = spare cheaper = 2 -cheaper-initial = 1 +cheaper-initial = 2 cheaper-step = 1 master = true
验证结果 修改为 cheaper-initial = 2 并重启 uwsgi 后,日志中该条 warning 警告彻底消失,每次拉起直接正常输出: daemon.info uwsgi-luci: spawned uWSGI master process (pid: xxxxx)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
https://github.com/sbwml/r4s_build_script/commit/625e206fb30d256afe27add279774ce8ec1fa15c
下次构建(日期大于等于 20261005)它会被应用上