I am trying to upload a large file (50mb to multiple GB) to my django website. I use the regular file upload method described in the django docs. It works fine for smaller files. I am serving the website with Nginx -> Gunicorn -> Django.
When the filesize is larger and the upload of the file takes longer than 30 seconds, the upload request will get "stalled" as chrome calls it and just freeze.
I originally thought this was a limit with nginx because the error.log said:
2018/08/03 01:13:09 [error] 1065#1065: *3 client intended to send too large body: 30681744 bytes,(...)
So I tweaked the following settings:
nginx.conf: ( in the http block)
client_max_body_size 100m;
client_body_buffer_size 100m;
client_body_timeout 120;
sites-available/host: ( in the server block)
send_timeout 120;
client_max_body_size 100m;
client_body_buffer_size 100m;
client_body_timeout 120;
After tweaking these, the error message has gone away.
The gunicorn log gives no further information. However, the documentation told me to start gunicorn with the --timeout 300 flag, so I did.
The file however still does not upload and "stalls" after 30 seconds of time.
Is this stalling a browser-issue? I remember uploading huge files with apache and PHP with no problems. Am I missing a django configuration?
Thank you for your time.