mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #1178] 【V2.1.6+】系统重启后,NginxUI启动无法访问且内存占用一直增加 #6416
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#6416
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xhal on GitHub (Jun 25, 2025).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1178
原先是在线升级的 V2.1.6
重启后无法访问, 内存占用快速增加

才启动一会,内存占用18%
1分钟左右后,内存占用50%

后手动升级成 V2.1.8
重启后还是无法访问, 内存占用也一直在增加,但比较慢了
10几分钟后,内存占用增加到10%

系统版本:
nginx -V信息
app.ini配置
@xhal commented on GitHub (Jun 25, 2025):
补充下进程信息, wget 访问一直在等待中...
@0xJacky commented on GitHub (Jun 25, 2025):
可以看看 nginx-ui 的日志吗
@xhal commented on GitHub (Jun 26, 2025):
@0xJacky commented on GitHub (Jun 26, 2025):
以上是全部日志了吗
@xhal commented on GitHub (Jun 26, 2025):
是的,从启动开始 到 结束进程
@0xJacky commented on GitHub (Jun 26, 2025):
了解,我看一下
@0xJacky commented on GitHub (Jun 26, 2025):
可否私发一下 app.ini 和 database.db 给我 me@jackyu.cn 感谢
@xhal commented on GitHub (Jun 26, 2025):
已发送
@0xJacky commented on GitHub (Jun 26, 2025):
收到
@0xJacky commented on GitHub (Jun 26, 2025):
试试更新到开发版还会有同样的问题吗?
@0xJacky commented on GitHub (Jun 26, 2025):
我可能大概知道了
@0xJacky commented on GitHub (Jun 26, 2025):
可以试试最新的开发版
@xhal commented on GitHub (Jun 26, 2025):
更新开发版本, streams菜单不见了; 内存占用10%,还是有点高
nginx 命令目录,已配置到 PATH
@0xJacky commented on GitHub (Jun 26, 2025):
应该还是没读到环境变量,这两个版本没改过这个部分
@0xJacky commented on GitHub (Jun 26, 2025):
如果您认为内存占用存在异常,可以切换到 debug 模式,然后提供您认为异常时的 pprof 信息
http://localhost:9001/api/debug/pprof/allocs?debug=1
http://localhost:9001/api/debug/pprof/goroutine?debug=1
http://localhost:9001/api/debug/pprof/heap?debug=1
通过压缩包上传
@xhal commented on GitHub (Jun 26, 2025):
nginx-ui-debuginfo.zip
@0xJacky commented on GitHub (Jun 26, 2025):
可以,这个日志很关键
@0xJacky commented on GitHub (Jun 26, 2025):
您可以更新至最新的开发版测试问题是否已经修复。
经过日志分析,应该是配置文件中出现了循环引用,我之前没有处理到这个边界情况,导致无限递归了。
@xhal commented on GitHub (Jun 27, 2025):
-rwxr-xr-x 1 root root 100947400 Jun 27 10:02 nginx-ui*10点02分 更新后,内存占用还是会上到400多MB
一晚上没关,监控CPU/内存, 一直都很高
@0xJacky commented on GitHub (Jun 27, 2025):
麻烦
journalctl -fu nginx-ui截图一下大量 ERROR 的报错@xhal commented on GitHub (Jun 27, 2025):
@0xJacky commented on GitHub (Jun 27, 2025):
可以再更新一次到最新开发版本并测试。关于环境变量的问题还需要您进行正确的配置。
@xhal commented on GitHub (Jun 27, 2025):
-rwxr-xr-x 1 root root 100947400 Jun 27 13:42 nginx-ui*更新后,没什么变化; PATH环境变量正常 ,可正常执行
错误日志
@xhal commented on GitHub (Jun 27, 2025):
是不是因为用了 软链接的问题; 2.1.x 版本之前是没问题的
@0xJacky commented on GitHub (Jun 27, 2025):
nginx-ui -v 看一下输出?
@xhal commented on GitHub (Jun 27, 2025):
用这命令更新的
bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ install --channel dev@xhal commented on GitHub (Jun 27, 2025):
再用命令更新了次,版本是一样的
@xhal commented on GitHub (Jun 27, 2025):
看了下
config_args.go代码,好像是getNginxExePath方法有问题,评估下能否这样改@0xJacky commented on GitHub (Jun 28, 2025):
新增了一个 SbinPath 的配置项,您可以手动指定一下 nginx 的执行路径以避免 $PATH 的问题
@0xJacky commented on GitHub (Jun 28, 2025):
现在,您可以再次更新至最新开发版,测试问题是否得到了解决。
应当输出 nginx-ui 2.1.9 版本
@xhal commented on GitHub (Jun 28, 2025):
更新后,服务启动报错, 重启也一样; 但用命令

/usr/local/bin/nginx-ui --config /usr/local/etc/nginx-ui/app.ini可正常启动@0xJacky commented on GitHub (Jun 28, 2025):
看一下
journalctl -u nginx-ui.service的具体报错@xhal commented on GitHub (Jun 28, 2025):
@0xJacky commented on GitHub (Jun 28, 2025):
可以试试新的开发版,另外配置一下 SbinPath 为您的 nginx 可执行文件路径(而不是文件夹)
@xhal commented on GitHub (Jun 28, 2025):
更新后,服务状态正常, CPU内存占用都降了,赞!!!
@0xJacky commented on GitHub (Jun 28, 2025):
Good