February 11, 2013

Empty response from Django after POST request

I am assuming you're serving up your application through Python, Django, uWSGI, and nginx.

There is a chance that an improperly configured uWSGI server will return a 200-code, empty response body when the initiating request had a large POST body.

Larger post bodies, such as those sent by twilio, are dropped by uWSGI, resulting in the above response.

To save you some time digging through logs, the easiest solution is to configure your uWSGI server with a larger post-buffer setting. At SaskTel Labs we've settled on 4096 bytes.

No comments:

Post a Comment