Search code examples
pythondjangoopenshiftmod-wsgiopenshift-3

openshift 3 django - request too large


I migrated a django app from Openshift 2 to Openshift3 Online. It has an upload feature that allows users to upload audio files. The files are usually larger than 50MB. In Openshift3 if I try to upload the file it only works for files up to around 12 MB. Larger than 12 MB leads to an error message in the firefox saying "connection canceled". Chromium gives more details:

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

I'm using wsgi_mod-express. From searching on this error message on google, I could see that it I'm probably hitting any limit in the webserver configuration. Which limit could that be and how would I be able to change it?


Solution

  • As per help messages from running mod_wsgi-express start-server --help:

    --limit-request-body NUMBER
                        The maximum number of bytes which are allowed in a
                        request body. Defaults to 10485760 (10MB).
    

    Change your app.sh to add the option and set it to a larger value.