Internal error with large number of messages selected in webmail
Closed this issue · 0 comments
Customer reported they were unable to delete large number of emails from webmail when using the new "Select all" feature. I reproduced this by selecting 500 messages and received "Internal error" when attempting to delete them.
I noticed the response to the failed request in my browser console was:
414 uri too large
After solving that error, following additional errors were shown in logs on server:
invalid request block size: 23034 (max 4096)...skip
django.core.exceptions.TooManyFieldsSent: The number of GET/POST parameters exceeded settings.DATA_UPLOAD_MAX_NUMBER_FIELDS.
I needed to make changes to these 3 files to fully solve the problem:
1.) /etc/nginx.conf, inside of http {
large_client_header_buffers 4 32k;
2.) /etc/uwsgi/apps-available/modoboa_instance.ini
buffer-size=128000
3.) /srv/modoboa/instance/instance/settings.py
DATA_UPLOAD_MAX_NUMBER_FIELDS = 10240
And afterwards:
systemctl restart nginx
systemctl restart uwsgi
After doing this, I was able to successfully delete 1000 at a time. The above numbers could be adjusted further of course if more than 1000 at a time is needed.