Background . The goal of my project is to create a very fast response website. There are only very few pages, many of them just redirect 302.
In Nginx, I register $request_time here .
In PHP, I register microtime start of a request and just before it microtime .
php-fpm (php 5.3.27) and nginx (1.4.4) work on the same computer, there is no database (just writing to the Beanstalkd queue), there are no complex nginx configurations.
Problem . There is a huge discrepancy between the PHP runtime and the Nginx $ request_time request. $ Request_time is usually 0.5 seconds, but within a few hours it looks more like 3 seconds . PHP runtime is always between 0.008 seconds and 0.02 seconds (using PhalconPHP ).
Question : Why can there be such a big discrepancy? Perhaps I do not quite understand what $request_time , or maybe my web servers have some kind of problematic configuration? I would be happy to provide more information about the environment.
php nginx
hdeh
source share