Skip to content
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

Fixes process overload from file events #3175

Merged

Conversation

acedrew
Copy link
Contributor

@acedrew acedrew commented Apr 22, 2024

Description

Changes file watcher classes to use "on_closed" rather than "on_any_change" event type, reducing frequency of events.
Fixes #3172

Type of change

Please delete options that are not relevant.

  • [*] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Deployed to platforms that were experiencing extreme resource utilization and verified utilization dropped significantly
  • Deployed to platforms with ongoing system profiling and verified the hotpaths in the platforms changed.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code

@craig8 craig8 merged commit 717c3fd into VOLTTRON:releases/8.2 Apr 24, 2024
1 of 12 checks passed
@craig8 craig8 mentioned this pull request Apr 24, 2024
@craig8
Copy link
Contributor

craig8 commented May 6, 2024

@acedrew This actually breaks the reloading of the web-users.json file.

@acedrew
Copy link
Contributor Author

acedrew commented May 6, 2024 via email

@craig8
Copy link
Contributor

craig8 commented May 6, 2024

I don't know...my guess is that we are reading auth.json in more than we do the web. So there are places that read it regardless of it being actually run through the event itself. Web users is only read/written in a couple of places.

@craig8
Copy link
Contributor

craig8 commented May 6, 2024

I suppose the other thing could be some gevent stuff happening that unless you use all_events then it's not getting propagated correctly? Not 100% sure

@craig8
Copy link
Contributor

craig8 commented May 6, 2024

@acedrew I think I found the issue. So the webusers uses a PersistentDict to write the data to a file. It writes data to a temp file and the copies the file into the proper space. This apparently is not what the filewatch mechanisms is expecting so it sends an infinite list of opened events! Sigh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants