I’m trying to optimize my website. Its custom made, uses phpBB-like code and structure, but the code is newly written and optimised, both on php and mysql side.
The webserver is Lighttpd, via fastcgi running php-fcgi v5.3
I see big lag between the DNS lookup and the first bytes being sent, as seen here
When I go microtime my page, it takes only
0.05 seconds to complete the page, but it takes
0.815 seconds to recieve first byte.
I’m speaking about the very first line (main php page), but I see significant amount of time wasted for first byte in almost all requests.
I wonder why ? Where shall I look for the difference ?
Thank you for any advice.