SO a form I have takes an image and uploads it. This produces an error when the image is over 128k, otherwise it works fine.
I don't have the error message, because it tries to render 500.shtml, which I don't have a template for in Django, so Django considers it a 404 (go figure). Notice the .shtml, this is not Django's regular 500 error, its the server. I am on shared hosting.
Using Django 1.4.5, Flup 1.0.3, Python 2.6.6
I've tried LimitRequestBody directive in my .htaccess, no effect
Additional details: This occurs both in the django admin interface, and on a custom form/view I've made. The view does not get executed. I have tried different file storage approaches (plain/filesystem and django-storages(s3boto). Everything works great so long as the file is under 128 KB
Update - no resolution: Talked at length with my hosting company. Checked other settings, etc. Unable to reproduce when deploying in local test environment. Ended up using a workaround on live site (using existing URL instead of live upload)
Was contacted by hosting company:
We just had another ticket in regarding this and were able to correct the issue. The fix is outline below.
We adjusted the value to FcgidMaxRequestLen 1000000000 in the apache config as outlined > http://forums.cpanel.net/f5/config-mod_fcgid-related-maxrequestlen-timeout-214031.html#post1008351
If anyone is still having this issue let us know via a ticket and we will be happy to adjust the value for the server your on as well.
Thanks
The topic can be found here: http://forums.asmallorange.com/topic/16354-django-and-media-uploads/?view=getnewpost
Just if anyone views this question in the future. Glad to know it wasn't my fault, at least. Too bad it took so long to resolve.