Matttermost, Inc.

Processing images is extremely slow

Summary

The “Processing” stage of uploading images with a large resolution (larger than 1500 pixels in one dimension) takes extremely long

Steps to reproduce

Using version 5.11.0, but this problem also existed on 5.9.0. It wasn’t always like this, however, the processing stage got slower and slower as time went on.
How to reproduce, try to upload an image with a large resolution. Might only be on my server, though.

Expected behavior

Processing should probably not take that long.

Observed behavior

The actual uploading of the image happens fairly quickly, but then gets seemingly stuck at the processing stage. Sometimes it finishes in around 3-6 minutes, sometimes even longer than 15 minutes where I stopped waiting.
I have tried observing the data directory and the logs when I try to upload images to the server, but the logs only tell about finished jobs from various workers, no error messages, even at debug output level.
The data directory contains the image as expected, but then gets stuck when creating the thumbnail and preview images.
All users on my server are affected, and it seems to only fail at large resolutions, not necessarily at large files. A 3000x2000 JPEG compressed to 80 kB failed to upload, but a binary file with 500 kB was done instantly.

Any ideas on what the issue could be? I’m kinda at a loss.

Hi @QuappaX,

What device, OS and OS version do you see this on?

Oh sorry, totally forgot to mention this.

The server is a Raspberry Pi 3 Model B+, running Raspbian Stretch, kernel version 4.14.98-v7+

Hi @QuappaX, would you be open to sharing your settings related to files: https://docs.mattermost.com/administration/config-settings.html#files, as well as this setting: https://docs.mattermost.com/administration/config-settings.html#allow-untrusted-internal-connections-to?

@amy.blais Sure.

File Storage System: Local File System
Local Storage Directory: “./data/”
Amazon S3 Bucket: none
Amazon S3 Region: none
Amazon S3 Access Key ID: none
Amazon S3 Endpoint: none
Amazon S3 Secret Access Key: none
Enable Secure Amazon S3 Connections: false
Enable Amazon S3 Debugging: false
Allow File Sharing: true
Maximum File Size: 8 MB
Enable Image Proxy: false
Image Proxy Type: none
Remote Image Proxy URL: none
Remote Image Proxy Options: none

Allow untrusted internal connections to: none

I should mention that I have the Open Source version, so I’m missing settings available for Enterprise.

Hi @QuappaX,

This (Raspberry Pi 3B+) is an unsupported architecture (arm64). Furthermore, it’s not that great in regards to compute power and memory. Would you be open to trying if you can reproduce the issue on a supported architecture? List is here: https://docs.mattermost.com/install/requirements.html#software-requirements.

@amy.blais

Of course. I will set up a server on a supported architecture as soon as I get to it, and I will respond when I tried reproducing it.