Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to enable php-fpm slowlog in docker? #295

Closed
snowair opened this issue Sep 5, 2016 · 1 comment
Closed

how to enable php-fpm slowlog in docker? #295

snowair opened this issue Sep 5, 2016 · 1 comment

Comments

@snowair
Copy link

snowair commented Sep 5, 2016

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
@yosifkit
Copy link
Member

yosifkit commented Sep 8, 2016

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

@snowair snowair closed this as completed Sep 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants