-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
default the preview_max_memory to a half of the max php memory #35854
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
Conversation
b2ac011 to
3ca9409
Compare
3ca9409 to
ed83721
Compare
Signed-off-by: Simon L <[email protected]>
ed83721 to
c5212ed
Compare
Signed-off-by: Simon L <[email protected]>
| ->method('getSystemValueInt') | ||
| ->with('preview_max_memory', 128) | ||
| ->willReturn(128); | ||
| ->with('preview_max_memory', 384) |
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.
The value depends on your machine. I fear we are going to introduce the next "wonky" test ;)
Could you try to set the memory limit for this test to a fixed value?
ini_set('memory_limit', '256M');
Best would be to mock the MemoryInfo class but that's a bit tricky here.
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.
Could you try to set the memory limit for this test to a fixed value?
ini_set('memory_limit', '256M');
Good idea, thanks! :)
|
server/lib/private/legacy/OC_Image.php Line 597 in 5848a36
A higher log level could also help. Auto-calculating preview_max_memory is a bit too much magic for me. |
All right. Then lets increase the default to 256 and also increase the log entry to info which should fix the issue as well imho. |
Your choice ;) I just shared my concerns. The issue with info is that most people use warning as default log level. |
|
Superseded by #35856 |
Close #31284