Bulk import error from Slack

Bulk import from Slack fails.

Steps to reproduce
Spin up MM Omnibus instance on Digital Ocean. (Ubuntu 20 LTS, MM 7.1.2)
Export Slack email/attachment data and convert to MM format per docs.
Attempt import of mattermost-bulk-import.zip (1.92gb)

Expected behavior
The Slack export is uploaded successfully.

Observed behavior
mmctl import upload mattermost-bulk-import.zip
Error: failed to upload data: AppErrorFromJSON: model.utils.decode_json.app_error, body:

413 Request Entity Too Large

413 Request Entity Too Large


Is this an nginx config error due to the large file size of the import?

Hi Scott and welcome to the Mattermost forums!

This is caused by the default configuration value client_max_body_size 50M in the file /etc/nginx/conf.d/mattermost.conf. In order to permanently increase this limit, you would have to create a custom nginx.conf template as described here, but since you will only need it once for the upload, it’s safe to manually make the change and not make it permanent. To do so (let’s set it to 4G), run the following commands:

sed -i -e 's/50M/4G/' /etc/nginx/conf.d/mattermost.conf
systemctl reload nginx

You should now be able to upload the bigger file.
Upon the next mmoni reconfigure, this setting will be reverted.