mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-26 09:15:56 +03:00
[PR #1547] [MERGED] Nginx-UI disk I/O #7110
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#7110
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?
📋 Pull Request Information
Original PR: https://github.com/0xJacky/nginx-ui/pull/1547
Author: @0xJacky
Created: 2/6/2026
Status: ✅ Merged
Merged: 2/7/2026
Merged by: @0xJacky
Base:
dev← Head:cursor/nginx-ui-disk-i-o-3d99📝 Commits (9)
4cae78cfix: prevent disk I/O overload from static files in nginx config directory1af40fbFix path matching bugs in shouldSkipPath and shouldWatchDirectoryc391f20fix: use relative paths for static directory pattern matching to avoid ancestor matchded394ffix: use filepath.Separator for cross-platform path matching in static directory checksd18cebffix: reorder static dir checks before config dir checks to prevent I/O overload35e2872fix: remove redundant config dir check and add path-separator boundariesfc27e51perf: move constant data structures to package level to avoid allocationse1c6fcefix: remove redundant HasPrefix check in isConfigFilePathdeb0ad7fix: remove dead HasPrefix branch in config dir pattern matching📊 Changes
1 file changed (+245 additions, -24 deletions)
View changed files
📝
internal/cache/index.go(+245 -24)📄 Description
Filter file watcher and scanner to ignore static asset directories and non-config files to prevent disk I/O overload.
When static asset folders (like
/etc/nginx/html/dist) were placed in the nginx config path, the file monitoring system (fsnotify) would generate a huge number of events for every file change (e.g., during zip extraction). Each event triggered a file scan, leading to massive I/O operations and server unresponsiveness. This PR introduces granular filtering for both directories and individual files to ensure only relevant Nginx configuration files are processed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.