Search code examples
nginxpagespeed

Why can't NumRewriteThreads and NumExpensiveRewriteThreads be used with Nginx PageSpeed?


So I was trying some settings of the Nginx PageSpeed module, but there was two settings that I couldn't set for some reason.

pagespeed NumRewriteThreads 2;
pagespeed NumExpensiveRewriteThreads 2;

For some reason these two settings always throw error when I try to restart or test my nginx config.

sudo service nginx restart
[FAIL] Restarting nginx: nginx failed!

When I test the file I get this:

"pagespeed" directive "NumRewriteThreads" not recognized or too many arguments in /etc/nginx/nginx.conf:40
nginx: configuration file /etc/nginx/nginx.conf test failed

My Nginx version is the following:

sudo /usr/sbin/nginx -v
nginx version: nginx/1.6.0

The settings appear in the PageSpeed docs as well, so I'm wondering if there's something I am missing to make them work.

https://developers.google.com/speed/pagespeed/module/system#tune_thread


Solution

  • I've entered a bug for this: ngx_pagespeed #728. I think it's just an oversight.