Created
November 5, 2019 17:57
-
-
Save liwo/807106b9577087380152bd8bf8bd3012 to your computer and use it in GitHub Desktop.
Tideways Xhprof error in FPM setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
php: | |
build: . | |
ports: | |
- "9000:9000" | |
volumes: | |
- .:/var/www/html/ | |
nginx: | |
image: nginx:latest | |
ports: | |
- "8080:80" | |
volumes: | |
- .:/usr/share/nginx/html/ | |
- ./nginx.conf:/etc/nginx/conf.d/default.conf | |
links: | |
- php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.1.30-fpm-buster | |
#FROM php:7.3.11-fpm-buster | |
RUN sed -ie 's/pm.max_children = 5/pm.max_children = 1/;s/pm.start_servers = 2/pm.start_servers = 1/;s/pm.max_spare_servers = 3/pm.max_spare_servers = 1/' /usr/local/etc/php-fpm.d/www.conf | |
ADD https://github.com/tideways/php-xhprof-extension/releases/download/v5.0.1/tideways-xhprof_5.0.1_amd64.deb /root/tideways-xhprof_5.0.1_amd64.deb | |
RUN dpkg -i /root/tideways-xhprof_5.0.1_amd64.deb | |
RUN echo 'php_admin_value[extension] = /usr/lib/tideways_xhprof/tideways_xhprof-7.1.so' >> /usr/local/etc/php-fpm.d/www.conf | |
#RUN echo 'php_admin_value[extension] = /usr/lib/tideways_xhprof/tideways_xhprof-7.3.so' >> /usr/local/etc/php-fpm.d/www.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
tideways_xhprof_enable(TIDEWAYS_XHPROF_FLAGS_CPU | TIDEWAYS_XHPROF_FLAGS_MEMORY); | |
phpinfo(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
root /usr/share/nginx/html; | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass php:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment