-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruff using 50-100gb Ram #9982
Comments
That's a lot of ram...
That sounds very likely because there's a bug that causes cache corruption if two processes write to the same cache file at the same time.
Are you saying that this only happens to processes spawned by the file watcher but running the same command over CLI doesn't suffer the same problem? That would be surprising because both the file watcher started and the CLI started ruff should load the same cache. Can you try to change your file watcher to pass |
I imagine it's because of the cache corruption as you say. Using the same command in the terminal doesn't cause the issue.
I'm running the file watcher now with the flag, I'll monitor and report later on the status. |
Okay I can now cause the error with Once you do a release of the new code I'll check again |
@tomhamiltonstubber thanks for the update. That's terrifying but glad that it is related to caching. You can try to remove the Thanks for keeping us posted! |
Yeah my guess is that the cache itself is now in a bad state — I’d suggest removing it and running with no-cache for now if you’re seeing this consistently, but I believe it should be fixed in the next release. |
@tomhamiltonstubber we've released a new version that includes the fix. Does this resolve the problem for you? |
I'm closing this. @tomhamiltonstubber feel free to re-open/comment if you're still experiencing the issue when using the latest ruff release. |
@MichaReiser I've been running without the |
Removing the |
Hi folks,
ruff
has just tried to use 100gb of memory on my machine while running the formatter twice at the same time:I think this is related to #8147 as it was triggered by PyCharm's File Watcher functionality and that seems to be when that happens. This is for a pretty big project, not public so I can't share.
The command that caused this was
ruff format
, the File Watcher config is shown here:My settings looks like:
and I'm using version 0.2.0
For the moment, I'm going to turn off the 'Trigger the watcher on external changes' flag as I presume this causing the issue, but lmk if you need more info.That didn't work and it's now happening regularly. I've had to disable the File Watcher completely for now, I still can't replicate using the command line.
The text was updated successfully, but these errors were encountered: