A
A
Andrey Pavlenko2016-05-14 23:48:55
PHP
Andrey Pavlenko, 2016-05-14 23:48:55

Permanent check of page loading speed?

Good afternoon!
I ran into a problem that some pages can create heavy loads on the server, but it can be quite difficult to find out specifically these pages.
There are solutions such as recording the execution time of certain pages in the access_log (using the %D modifier in LogFormat in the httpd.conf file), but at the output we get only information on each click separately.
But it would be nice to find out the following:
1) which pages take the longest to execute?
2) what time does it happen?
3) filter by date/time.
What are the solutions for this?
Unfortunately, Google didn't help. In a good way, I understand that the system administrator should deal with this, but for now I need you to tell me, at least in the direction of which solutions to dig. Thank you!
What came to mind is to create a script that will analyze certain logs and show which pages are voracious in this sense, but this is a lot of my own time. Are there really no ready-made solutions?
In parallel, I used xdebug, but I did not find any problematic places in the code. mysql_slow_queries also helps quite well, but if there are no voracious specific queries (but there are many less voracious ones on one page), then this is also not a panacea.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
Pavel K, 2016-05-14
@PavelK

php-fpm has slow-log
Apache, unfortunately, does not, but you can do this:
in php.ini
auto_append_file = path/my_timer.php

$time = time() - $_SERVER['REQUEST_TIME']; 
if($time > 30)
{
...
}

X
xmoonlight, 2016-05-15
@xmoonlight

But it would be nice to find out the following:
1) which pages take the longest to execute?
2) what time does it happen?
3) filter by date/time.
DataMining task from the log.
As suggested by Pavel K , do append and write everything to the base.
Then - mine.

I
index0h, 2016-05-15
@index0h

As far as I understand you are looking for graphite+statsd | zabbix

V
Viktor Taran, 2016-05-16
@shambler81

Dear, what engine?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question