fix(cli): handle EMFILE/ENOSPC in file watchers with polling fallback#323
Closed
noahkhomer18 wants to merge 1 commit into
Closed
fix(cli): handle EMFILE/ENOSPC in file watchers with polling fallback#323noahkhomer18 wants to merge 1 commit into
noahkhomer18 wants to merge 1 commit into
Conversation
When fs.watch() throws EMFILE or ENOSPC due to system file watcher limits being exhausted, the dev server would crash before starting. Now each watcher is wrapped in its own try/catch, and resource errors fall back to polling (stat-based) change detection with a 1-second interval. Non-resource errors still fail fast. Applies to: - Config file watchers in flue.ts (config directory watches) - Recursive root watcher in dev.ts (project file watching) - Environment file watcher in dev.ts (.env changes) Closes withastro#314
|
Thanks for the contribution! We're closing this PR and moving the conversation to the issue: #324 We've moved to a model where bugs and feature proposals are discussed in issues/discussions before code review, so the community can help prioritize and shape the work. Your branch is linked from the new thread so the implementation isn't lost — please join us there to continue the conversation. — astrobot 🤖 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When fs.watch() throws EMFILE or ENOSPC due to system file watcher limits being exhausted, the dev server would crash before starting. Now each watcher is wrapped in its own try/catch, and resource errors fall back to polling (stat-based) change detection with a 1-second interval. Non-resource errors still fail fast.
Applies to:
Closes #314