Blitz timeouts with EasyEngine [pagespeed issue]
Did a quick comparison of the same site on two instances:
-
with W3TC Page (memcached), Object Cache (memcached), and W3TC Browser cache enabled. - My current setup
-
with EasyEngine Nginx fastcgi cache, Nginx Browser cache, and w3tc object cache (memcached).
Test site was a copy of real full wordpress site with more than 500 posts.
Attached are the Blitz results. EE Nginx settings are default. I am not sure if EE Nginx settings should be optimized but I am surprised to see the big difference. @rahul286 any thoughts would be much appreciated.

Did you verify fastcgi cache was working correctly?
Please share URL you tested.
https://www.blitz.io/ I'll try to incorporate some of these tests/results into my workflow. Thanks.
www.htpcbeginner.com was the test site.
Yes, fastcgi cache is working:
Here are the links to full blitz reports:
- https://www.blitz.io/report/671aa8181fe71068232f458e2f6eef05
- https://www.blitz.io/report/671aa8181fe71068232f458e2f4bdd13
- with W3TC Page (memcached), Object Cache (memcached), and W3TC Browser cache enabled. - My current setup
What was web server config in other case? Was it nginx/apache?
- with EasyEngine Nginx fastcgi cache, Nginx Browser cache, and w3tc object cache (memcached).
Did you test with pagespeed on/off? What was command used to create EE site?
If you have both setup available can I check wordpress admin and server config for both cases?
- Nginx, MySQL, PHP5-FPM, Memcached, and Opcache.
- Nginx with pagespeed (but disabled in site config), MariaDB, PHP5-FPM, FastCGI cache, Memcached, and Opcache. ee site create htpcbeginner.com --wpfc.
I found that with pagespeed the CPU usage was 5-6 times higher. That was a brief test and did not dig deeper.
pagespeed still included in nginx.conf. Should I exclude that?
- Nginx, MySQL, PHP5-FPM, Memcached, and Opcache
Was it custom nginx config or generated by EE?
pagespeed still included in nginx.conf. Should I exclude that?
Ya. Please turn off pagespeed and test again.
Default EE site conf. OK. testing again with ps off.
I have the EE setup (2) active right now which I can give you access. If you want the other setup (1), I will have to flip the DNS (but I can provide shell access without flipping DNS).
If so, let me know how I can forward the details privately.
Wow!!! Big difference with pagespeed completely off. Now EE results much better and I had to run it twice just to make sure.

With EE I had 34 more errors but the response times were much improved and stable. Not sure why pagespeed slows the site down so much.
https://www.blitz.io/report/671aa8181fe71068232f458e2f6cb3bb
I just verified an EE site and it works nice!
Before pagespeed update - https://www.blitz.io/report/671aa8181fe71068232f458e2f04567c
I will be running same test with pagespeed soon.
Yours is even better. How do you have such low response times, is it because rtcamp.cloudapp.net is a blank WP site? Curious to know your test with PS on Ragul. @rahul286
And why does pagespeed slow the site down - opposite of what it is expected to do.
I think it would depend on what pagespeed is doing. I will test with pagespeed off. I know I am probably asking it to do too much. It has to parse all the output before sending it to the browser, but thought that if the content was cached, the time getting the file to PS would be minimal, or PS could cache that output, so it's not crunching each and every time.
Blank site should not matter as once a page is cached, it matter of nginx reading a static file from fastcgi-cache which is stored in memory (tmpfs) in EE.
Lower response time could be because of location of server may be closer to blitz test server.
I also faced similar error rate with pagespeed - https://www.blitz.io/report/671aa8181fe71068232f458e2f4b10bc
I will try to check pagespeed config.
By default when ee enables pagepseed, it only enable support. One need to play with pagespeed filters and this part cannot be automated as it depends on site's markup.
@cm896 @rahul286 Thanks for spending time on this.
I just remembered a discussion from rtcamp forum - http://community.rtcamp.com/t/fastcgi-cache-related-questions/2076/2
I will check https://groups.google.com/forum/#!msg/ngx-pagespeed-discuss/vzSq8XQPGmM/9mE11D-9U8YJ in morning.
Meanwhile, if anyone finds anything concrete in thread https://groups.google.com/forum/#!msg/ngx-pagespeed-discuss/vzSq8XQPGmM/9mE11D-9U8YJ or anywhere else on the web, please let us know.
@htpcBeginner Thanks for sharing your information, the insight into the added overhead PS is adding to the average response time will help me debug and I will test with it disabled, even though the client loves the boost to the page rank score shown.
All the credit goes to @rahul286. I am only a bystander, trying to read, learn and improve. I am using the debug slides/suggestion from @rahul286 to find my client's site speed issues. Thanks @rahul286 for all the great work and suggestions, it's appreciated.
@rahul286 One last question. EE by default sets worker_rlimit_nofile to 100000. Should this be customized based on hardware?
I also have worker_processes to 2 (2 core VPS) instead of EE's auto and worker_connections to 2048 instead of EE's default 4096.
Because of the above results, I will be moving to EE. Next up is removing W3TC and settling on object cache solution with either memcached or redis.
I guess this thread has answer - https://developers.google.com/speed/pagespeed/module/downstream-caching. I will try to test this tomorrow. But if anyone tries and gets it working, please share config/results.
EE's copy of nginx already has ngx_cache_purge purge module compiled in it so that step can be skipped.
About other questions:
I also have worker_processes to 2 (2 core VPS) instead of EE's auto and worker_connections to 2048 instead of EE's default 4096.
Auto always means equal to number of cores, which is recommended. In your case, it would have been 2 only with auto.
EE by default sets worker_rlimit_nofile to 100000. Should this be customized based on hardware?
Ya. I do not have formula for it but I prefer to set higher limits. My idea is to not let a server hit its own limit before OS limits. But again, I set it randomly and it worked. Before that my load tests were failing quite early.
Next up is removing W3TC
We also want to remove W3TC and hence added support for pagespeed. If pagespeed works nicely, we can use it for minify and CDN.
I loved W3TC in early days but it seems bloated now. So I also want to remove it from my servers asap.