Skip to content

Commit

Permalink
fpm log slow queries and install strace on fpm containers. (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
EarthlingDavey authored Nov 5, 2024
1 parent 3768853 commit 0b256f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ ARG version_cron_alpine=3.19.1

FROM ministryofjustice/wordpress-base-fpm:latest AS base-fpm

RUN apk update && \
apk add strace

# Make the Nginx user available in this container
RUN addgroup -g 101 -S nginx; adduser -u 101 -S -D -G nginx nginx

Expand Down
8 changes: 6 additions & 2 deletions deploy/config/php-pool.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ listen.owner = nginx;
listen.group = nginx;
listen.mode = 0660;

ping.path=/ping
ping.response=pong
ping.path = /ping
ping.response = pong

pm = dynamic;
pm.start_servers = 10;
Expand All @@ -18,6 +18,10 @@ pm.max_requests = 500;
pm.max_children = 20;
pm.status_path = /status;

; Log a stack trace to stderr for slow queries.
request_slowlog_timeout = 10s;
slowlog = /proc/self/fd/2;

[global]
daemonize = no
emergency_restart_threshold = 10;
Expand Down

0 comments on commit 0b256f0

Please sign in to comment.