Quantcast
Channel: Planet Grep
Viewing all articles
Browse latest Browse all 4959

Mattias Geniar: Nginx & SPDY error: net::ERR_SPDY_PROTOCOL_ERROR

$
0
0

I recently enabled SPDY on this blog, and once in a while I got the following error in my browser, causing chunks of the page (javascript, CSS, ...) to stop loading.

net::ERR_SPDY_PROTOCOL_ERROR

spdy_protocol_error

The solution turned out to be really simple, at least in this case, by just looking at the error logs produced by this vhost.

==> /var/www/site.be/logs/error.log <==
2014/12/18 00:15:01 [crit] 1041#0: *3 open() "/usr/local/nginx/fastcgi_temp/4/00/0000000004" failed (13: Permission denied) while reading upstream, client: 1.2.3.4, server: ma.ttias.be, request: "GET /page.php?..."

To enable SPDY I had upgraded my Nginx to the latest available 1.7.8, but in the process of that installation it seems some file permissions were incorrectly modified. For instance, the FastCGI cache - the one that holds the responses for the PHP-FPM upstream - were owned by user nobody, with only write permissions to the owner.

ls -alh /usr/local/nginx/fastcgi_temp
drwx------ 12 nobody root 4096 Feb 11  2012 fastcgi_temp

And as an obvious result, Nginx couldn't write to that cache directory. Modified the permissions to grant the user nginx write permissions, and all errors were gone.

chown nginx:nginx /usr/local/nginx/fastcgi_temp/ -R

And all SPDY protocol errors were gone. Conclusion? Check the errors logs when you implement a new protocol in the middle of the night.

The post Nginx & SPDY error: net::ERR_SPDY_PROTOCOL_ERROR appeared first on ma.ttias.be.


Viewing all articles
Browse latest Browse all 4959

Latest Images

Trending Articles



Latest Images