Multiple picture uploads exhausts memory quickly

stromb0li

Well-known member
Affected version
2.3.7
Our community has a section for photographers and it's not uncommon for them to upload images up to 20MB in filesize. While upload and attachment to the post is fine, on submission, XenForo will attempt to process them all at the same time, which leads to extremely high memory utilization. This will topple over the request with something like this: ErrorException: Fatal Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 81800152 bytes) src/vendor/symfony/mime/RawMessage.php:56

Ask: process files async to eliminate high spikes on file uploads.
 
Last edited:
Ask: process files async to eliminate high spikes on file uploads.
This is IMHO not really possible (without significate impact on user experience).

The total size of attachments shouldn't matter.

What is the the width and height of the image that caused the error?
What is your maxImageResizePixelCount in config.php and your memory_limit?
Do you have a full stacktrace?
Do you use ImageMagick or GD?
 
Actually, this looks like user error/a bug on an add-on I have when processing the attachments (the attachments are already processed, but it's trying it again).

This can be marked as not a bug. Sorry about the noise!
 
Back
Top Bottom