Ran into a problem with nginx(0.6.32) + memcached and post requests. These would return a 405 Not Allowed, which is fine, but when you try to handle that 405 with error_page it would just hang.
The following is a snippet from the nginx config of what I was trying to do:
error_page 404 405 = @process_req;
Upgrading nginx from 0.6.32 to 0.6.34 solved the problem.