How to force php-fpm to display slow log?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to force php-fpm to display slow log?

wld75
slowlog = /var/log/php-fpm/slow.log
request_slowlog_timeout = 1s
This following two lines are added in the php config file. Once it is added
and restart php-fpm, the slow.log file is created.

(request: "GET /index.php") executing too slow (1.072177 sec), logging
This error is displayed in error.log file of php-fpm. But there is no
additional details.

I am not able to trace which url is causing the trouble. It is codeigniter
framework. So I used the framework's benchmarking tool on all the methods
and found the execution is fast 0.004 to 0.01 for multiple test

What could be the possible reason for slow.log being empty? Is there a way
to get complete url in the error log for slow process?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,277048,277048#msg-277048

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: How to force php-fpm to display slow log?

Anoop Alias
/index.php  -- is the URL as stated by the log you provided.  

On Tue, Oct 24, 2017 at 8:39 PM, agriz <[hidden email]> wrote:
slowlog = /var/log/php-fpm/slow.log
request_slowlog_timeout = 1s
This following two lines are added in the php config file. Once it is added
and restart php-fpm, the slow.log file is created.

(request: "GET /index.php") executing too slow (1.072177 sec), logging
This error is displayed in error.log file of php-fpm. But there is no
additional details.

I am not able to trace which url is causing the trouble. It is codeigniter
framework. So I used the framework's benchmarking tool on all the methods
and found the execution is fast 0.004 to 0.01 for multiple test

What could be the possible reason for slow.log being empty? Is there a way
to get complete url in the error log for slow process?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,277048,277048#msg-277048

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx



--
Anoop P Alias 


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: How to force php-fpm to display slow log?

wld75
Sir, codeigniter is executing everything from index.php
The coding which has been done are in the controller, model and view
folders.

The actual url which user see is different. It is routed. Can we get that
url?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,277048,277050#msg-277050

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx