Mattermost, Inc.

"Processing" during image upload

I have a mattermost instance running on a Pi3 and so far am really impressed. There is only one issue that would prevent adoption. Bear with me - I know that ARM isn’t strictly supported and a 1Gb box is small, but the same box runs Matrix, SuiteCRM and Nextcloud without breaking a sweat.

My issue is this - I share a jpg image and as soon as the size exceeds (around) 500k, the upload looks complete (in terms of progress bar) but I then get a popup which says “Processing”. It will say that for up to 3-5 minutes depending on image size while all 4 cores show pegged at 100% CPU.

My question is - what is it doing while “Processing” - if I look at Nextcloud and Matrix which are doing basically the same tasks of copying the file to local storage and generating a small thumbnail plus some DB indexing, I just don’t understand what it being done in Mattermost that doesn’t seem to be required in the other apps?

I have trawled issues and posts and the most common responses were to the two caveats I mentioned at the top. I accept those but would dearly like to understand what is driving this behaviour.



Also - clearly not related to images per se which was my original assumption. I just uploaded a 10mb SQL dump - that reached 89% then stopped and also stopped my server…

I’ve seen comments about loading the entire file into ram but even if that’s correct - 10mb is neither here nor there.

I’m going to try and spin up a 1G instance on an x86-64 architecture at some point and see what happens (perfectly prepared to accept it’s related to ARM arch) but would still appreciate a dev or someone who knows what “processing” means.



Ok… I set up a 64bit Virtualbox instance with 1gig and the system now works as expected.

It’s a shame it won’t run on the Pi but it seems not.

I’m still curious what happens during “processing” because I see it on the VM, it just doesn’t hang the box…

There are two things I am aware that could cause it to hang for awhile in “Processing”.

  1. We do some image processing.
  2. Plugins can do their own processing on file uploads eg.

Is the Pi3 hanging because of memory pressure? If it’s using swap space that could cause the CPU to max out. It’s possible that we use more memory then the file size.


It’s possible to be memory pressure although the x64 VM I am now running is the same 1gb and that never gets over 4-500 mb real… I have encountered occasional swap usage but tested by clearing that (swapoff -a / swapon -a) and then uploading an image. Still stuck and even with small images, the wait seems excessive (10-15 secs).

I guess I’m just curious regarding what processing is required other than thumbnail(s)? I don’t have any plugins enabled on the Pi.


I don’t think there is any further processing beyond images and plugins.