Php: how to enable php-fpm slowlog in docker?

Created on 5 Sep 2016  路  1Comment  路  Source: docker-library/php

php-fpm.conf:

slowlog = /var/log/$pool.log.slow
request_slowlog_timeout = 1

php script:

sleep(3);

docker logs:

[05-Sep-2016 07:40:49] ERROR: failed to ptrace(ATTACH) child 15: Operation not permitted (1)
[05-Sep-2016 07:40:49] WARNING: [pool www] child 15, script '/var/www/dmz.php' (request: "GET /dmz.php/welcome/index.php") executing too slow (1.102794 sec), logging

The slowlog size is always zero:

root@fe9f9c9c3a88:/# ls /var/log/www.log.slow -l
-rw------- 1 root root 0 Sep  5 07:40 /var/log/www.log.slow

The Host mechine:

$ cat /proc/sys/kernel/yama/ptrace_scope 
0

Most helpful comment

That looks like it is http://serverfault.com/a/706982.

>All comments

That looks like it is http://serverfault.com/a/706982.

Was this page helpful?
0 / 5 - 0 ratings