Request Entity Too Large

283 views
Skip to first unread message

Jashugan

unread,
Sep 17, 2009, 1:47:48 PM9/17/09
to Django users
Hello,

I have a user who is trying to upload a large file (> 50MB) to our
Django application. The error that they are getting is:

Request Entity Too Large
The requested resource
/ri/agent/orders/create/
does not allow request data with POST requests, or the amount of data
provided in the request exceeds the capacity limit.

Initially, I was thinking about changing FILE_UPLOAD_MAX_MEMORY_SIZE
in settings.py, but the documentation says files larger than this will
simply be streamed. And this is played out in the application when we
upload 25 MB files.

I'm running Apache + mod_python + Django 1.1

Any ideas what settings I can look at?

TIA.

Karen Tracey

unread,
Sep 17, 2009, 2:39:36 PM9/17/09
to django...@googlegroups.com

Jashugan

unread,
Sep 18, 2009, 1:44:01 PM9/18/09
to Django users

On Sep 17, 11:39 am, Karen Tracey <kmtra...@gmail.com> wrote:
>
> http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody
>
> Karen

Excellent! Thanks Karen.

Graham Dumpleton

unread,
Sep 19, 2009, 8:06:11 AM9/19/09
to Django users


On Sep 18, 4:39 am, Karen Tracey <kmtra...@gmail.com> wrote:
The limit request body directive is effectively broken in conjunction
with mod_python. Read:

https://issues.apache.org/jira/browse/MODPYTHON-240

Stop using mod_python, use mod_wsgi instead, where it works properly
as mod_wsgi does specific checks of its own in relation to
LimitRequestBody directive before any work done, where as mod_python
relies on lower level Apache HTTP input filter code doing the checks,
and which causes problems as explained in the ticket in mod_python
issue tracker.

Graham
Reply all
Reply to author
Forward
0 new messages