Skip to content

Commit

Permalink
Enabled PHP FPM status page on /php-fpm-status
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Jun 27, 2022
1 parent 48e37c5 commit 6ad692d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## 3.9.0 (not released yet)

* Increase the number of FPM worker from 4 to 25
* Enabled PHP FPM status page on `/php-fpm-status`

## 3.8.0 (2022-06-15)

* Add documentation cookbook for using pg_activity
Expand Down
13 changes: 13 additions & 0 deletions infrastructure/docker/services/frontend/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ http {
add_header Cache-Control "no-cache";
}

location ~ ^/php-fpm-status$ {
# Warning: in production you must secure this page!
access_log off;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
}

location / {
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
Expand All @@ -49,6 +58,10 @@ http {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
fastcgi_param SERVER_NAME $http_host;
# # Uncomment if you want to use /php-fpm-status endpoint
# # This allow to see the real URI of the request in the dashboard
# # It may have some side effects, that's why it's commented by default
# fastcgi_param SCRIPT_NAME $request_uri;
}

error_log /proc/self/fd/2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pm.start_servers = 2
pm.min_spare_servers = 2
pm.max_spare_servers = 3
pm.max_requests = 500
pm.status_path = /php-fpm-status
clear_env = no
request_terminate_timeout = 120s
catch_workers_output = yes

0 comments on commit 6ad692d

Please sign in to comment.