-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
enh(metadata): Introduce a memory limit for metadata generation #42800
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, but I'm not familiar enough with the metadata stuff to officially review (though code looks reasonable).
Suggestion: Add the new parameter to config.sample.php
here too
It's the ToDo point on the PR summary 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, I forgot to submit the review
Thank you, good idea 👍 I think the decision "can this file be processed" should live in the actual event listeners. But the event listeners I checked all read the file, and therefore it's a practical approach. The naming is a bit misleading because it's not a memory limit but a file size limit. |
If |
That's good, thank you 👍 |
Please don't forget to update the config.sample.php I'm not sure how useful the debug log is, but without you have no idea why the metadata generation was skipped for a given file. |
c5adc87
to
a88d4e0
Compare
/backport to stable29 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amended to fix the commit message.
Psalm is failing because the latest rebase brought in #46450 that changed IConfig to IAppConfig. |
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Co-Authored-By: Louis <louis@chmn.me> Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Summary
Fix #42793
By introducing a (configurable) memory limit, one should not reach OOM on very big files that the server can't support.
TODO
metadata_max_filesize
paramSimilar to:
server/config/config.sample.php
Lines 1241 to 1249 in 265e906
Checklist