mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #1533] 磁盘读写被打满 #3054
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#3054
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 @z499738316 on GitHub (Jan 25, 2026).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1533
我放入了一个前端的静态文件夹到nginx里
但是放入后nginx瞬间读写就被打满 服务器出现异常 只能强制重启 重启后第一时间关闭nginx-ui可以恢复正常 但是一旦打开nginx-ui 又会被卡死
@0xJacky commented on GitHub (Jan 25, 2026):
方便的话可以提供一下 nginx-ui 出现问题时的运行日志
journalctl -fu nginx-ui
@z499738316 commented on GitHub (Jan 27, 2026):
这个是日志
111.txt
@z499738316 commented on GitHub (Jan 27, 2026):
我也不知道为啥 只要放上这个静态文件,文件读写瞬间打满 然后服务器卡死
@0xJacky commented on GitHub (Jan 28, 2026):
可以先尝试将静态文件目录放到非 nginx 配置文件目录下的路径中
@0xJacky commented on GitHub (Feb 6, 2026):
@cursoragent fix it
@cursor[bot] commented on GitHub (Feb 6, 2026):
I have successfully fixed the disk I/O overload issue. Here's a summary of the changes made:
Summary
The issue was that when users placed static file folders (like frontend dist folders) under the nginx config directory (
/etc/nginx/html/), the file watcher would monitor all files and trigger scans for each file change. This caused severe disk I/O overload when extracting zip files or copying large directories.Changes Made to
internal/cache/index.go:Added more excluded directories to
getExcludedDirs():html,www,static,assets,public,webrootAdded
shouldWatchDirectory()function to filter directories:dist,build,node_modules,__MACOSX,vendor,images,css,js,fonts, etc.sites-available,sites-enabled,streams-available,streams-enabled,conf.d,snippetsAdded
isConfigFilePath()function to filter files by path/extension:.conffiles and files in known config directoriesnginx.conf,mime.types, etc.Updated
watchAllDirectories()to skip non-config directoriesUpdated
handleFileEvent()to skip non-config filesUpdated
scanSingleFileInternal()to skip non-config files earlyUpdated
scanDirectoryRecursiveInternal()to skip non-config directories and files