Nginx proxy_pass response truncated

Solution 1:

I know this question is super old, but I just ran into the same issue. Make sure the user you are running nginx as has write privileges to the proxy_temp directory. If you are serving a larger response through your proxy server that can't all be held in your proxy_buffers, the rest of the response data gets written to disk in your proxy_temp directory. If it can't because of inadequate privileges (or something else, i.e. disk space), then the response gets truncated.

An easy way to tell is this is the issue is to clear your browser cache, and reload the page with Chrome developer tools open. Find the truncated file in the network tab, and if the size matches your proxy buffer size (64k in your case) then nginx is likely having issues writing to disk.

More info on the nginx proxy_temp_path: http://wiki.nginx.org/HttpProxyModule#proxy_temp_path