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

Make RotatingFilehandler used in DagProcessor non-caching #27223

Merged
merged 1 commit into from Oct 25, 2022

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Oct 23, 2022

The RotatingFileHandler is used when you enable it via CONFIG_PROCESSOR_MANAGER_LOGGER=True and it exhibits similar behaviour as the FileHandler had when it comes to caching the file on the Kernel level. While it is harmless (the cache will be freed when needed), it is also misleading for those who are trying to understand memory usage by Airlfow.

The fix is to add a custom non-caching RotatingFileHandler similarly as in #18054.

Note that it will require to manually modify local settings if the settings were created before this change.

Fixes: #27065


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@potiuk potiuk force-pushed the add-non-caching-rotating-handler branch 3 times, most recently from 7a2b019 to 8f5a0e0 Compare October 24, 2022 19:30
The RotatingFileHandler is used when you enable it via
`CONFIG_PROCESSOR_MANAGER_LOGGER=True` and it exhibits similar
behaviour as the FileHandler had when it comes to caching
the file on the Kernel level. While it is harmless (the cache
will be freed when needed), it is also misleading for those who
are trying to understand memory usage by Airlfow.

The fix is to add a custom non-caching RotatingFileHandler similarly
as in apache#18054.

Note that it will require to manually modify local settings if
the settings were created before this change.

Fixes: apache#27065
@potiuk potiuk force-pushed the add-non-caching-rotating-handler branch from 8f5a0e0 to 6fecc3a Compare October 24, 2022 23:16
@potiuk potiuk merged commit 126b7b8 into apache:main Oct 25, 2022
@potiuk potiuk deleted the add-non-caching-rotating-handler branch October 25, 2022 08:38
@potiuk potiuk added this to the Airflow 2.4.3 milestone Oct 25, 2022
ephraimbuddy pushed a commit that referenced this pull request Nov 9, 2022
The RotatingFileHandler is used when you enable it via
`CONFIG_PROCESSOR_MANAGER_LOGGER=True` and it exhibits similar
behaviour as the FileHandler had when it comes to caching
the file on the Kernel level. While it is harmless (the cache
will be freed when needed), it is also misleading for those who
are trying to understand memory usage by Airlfow.

The fix is to add a custom non-caching RotatingFileHandler similarly
as in #18054.

Note that it will require to manually modify local settings if
the settings were created before this change.

Fixes: #27065
(cherry picked from commit 126b7b8)
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Nov 9, 2022
ephraimbuddy pushed a commit that referenced this pull request Nov 9, 2022
The RotatingFileHandler is used when you enable it via
`CONFIG_PROCESSOR_MANAGER_LOGGER=True` and it exhibits similar
behaviour as the FileHandler had when it comes to caching
the file on the Kernel level. While it is harmless (the cache
will be freed when needed), it is also misleading for those who
are trying to understand memory usage by Airlfow.

The fix is to add a custom non-caching RotatingFileHandler similarly
as in #18054.

Note that it will require to manually modify local settings if
the settings were created before this change.

Fixes: #27065
(cherry picked from commit 126b7b8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logging type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log files are still being cached causing ever-growing memory usage when scheduler is running
3 participants