Uploading file > 1 MB on Django admin gives 400 Bad Request response.

Posted by ayaz on Server Fault See other posts from Server Fault or by ayaz
Published on 2011-03-18T10:57:34Z Indexed on 2011/03/19 8:11 UTC
Read the original article Hit count: 319

Filed under:
|
|
|
|

I have a small Django (1.2.x) project deployed on Apache (2.x) via mod_wsgi (2.x). In the admin, if I upload a file < 1MB, I can get it through; however, for a file, say, 1.2MB in size, I get a 400 response from the server with "Error 400" in the body only. I am wondering why this is happening. As far as I can see, there is no LimitRequestBody set in Apache configuration. I have tried uploading with several browsers including: Firefox, Chrome, and Safari.

In the log file for Apache, there is apparently no entry for requests that gave the 400 error response. This is strange.

I should point out that the scenario where this is happening is thus: The project in question is deployed on two identical Apache servers (completely identical setup) that are behind a load balancer. On my development setup, of course, the problem does not surface.

Any help with this will be very much appreciated.

© Server Fault or respective owner

Related posts about apache

Related posts about django