Php – IIS 7.5 & Joomla very slow TTFB response

iis-7.5joomlaPHPwindows-server-2008-r2

I have a Joomla site (Joomla! 3.4.1 Stable) running on Windows & IIS that takes almost 11 seconds to even respond to any request. Other subdomains (sub.domain.com) respond almost instantly but the main (with or www or without) takes a very long time. Almost 11 seconds TTFB. My questions are several:

  1. How can I troubleshoot this? The server processes are normal as is memory. Nothing seems to be stuck or sucking up resources abnormally.
  2. Are there any known issues with Joomla that would cause it to be slow to respond with the first byte?
  3. Are there some specific Joomla tools I can install or use to monitor what's happening on the Joomla side?
  4. Same question as above for IIS?

Steps taken so far

  1. We monitored our clicks using chrome developer tools to show that only the very first TTFB from our main domain is a problem.
  2. Once we verified it was any first byte from the url, we thought it might be the entire site, so we uploaded a plain txt file. It loaded instantly.

This is all I know to do really. That's why I'm asking for help in troubleshooting both Joomla and IIS. It could actually be PHP as well, but I don't know where to start really.

Best Answer

This it an IPv6 related issue discussed a lot online.

The simple solution is to use the IPv4 address instead of the host name. For example if the mysql server runs on the same host. Change 'localhost' to '127.0.0.1'.