I'm running a server with nginx as proxy to a gunicorn/django application. 
 When I upload files of about 4.7 GB, they get processed correctly by 
multipartparser yielding a temporary file object in the request.FILES 
dictionary, as expected.  However, when any file greater than about 4.7GB 
is uploaded, no errors are produced, but when my django request handler is 
invoked, request.FILES is empty.  

I've added some debug logging to multipartparser.py and uploadhandler.py so 
that I can see the progress of the parsing of the multipart mime message. 
 When iterating through the chunks of the "file" part, it seems to stop the 
iterating prematurely.  for example, on a 4718220171 byte file, where the 
chunk size is 65536, it only processes 10934 chunks.  This represents about 
716570624 bytes, which is a fraction of the total file.  We never finish 
parsing the "file" part, and the dummy RAW boundary that is supposed to 
follow the file part never arrives, and thus, the handle_file_complete 
processing never occurs.

There are no errors from either gunicorn nor nginx.  No timeouts, no 
dropped connections, etc.  The client_max_body_size nginx parameter is set 
to "0", which means, no limit on the body size.  

When I try a similar setup on a local machine (with 
nginx->gunicorn->django), and an obviously fast local loopback connection, 
I can upload files of 5GB with no problems.  However, in the "real" world, 
where, on AWS, I have this stack deployed, and where clients have much 
slower connections to upload files, any files greater than about 4.7GB fail 
in the way described above.

Can anyone suggest any solutions or debugging approaches?  

-- Eric

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b131a8d6-eb80-4036-aafa-234fd6fe8f29%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to