Today I found myself in the situation where web pages were not fully served or randomly hang. Often triggering a ERR_SPDY_PROTOCOL_ERROR. First, I suspected this was due to CloudFlare. After some investigation, I found it was my own NGINX installation that was lacking.
Apparently the build of NGINX that came with OpenResty didn't have the tmp_paths set correctly. This can be fixed during the configuration of the build, or afterwards in the configuration files itself. Which was kind of fun since this app didn't use OpenResty but only Sinatra served by Puma and RACK.
[crit] 22084#0: *142 open() "/var/lib/nginx/proxy/1/01/0000000011" failed (13: Permission denied) while reading upstream, client: 188.8.131.52, server: my_app.example.com, request: "GET /path HTTP/1.1", upstream: "http://unix:///path/to/app/tmp/puma.sock:/path", host: "my_app.example.com", referrer: "https://my_app.example.com/path"