Skip to content

Conversation

@aparador
Copy link
Contributor

@aparador aparador commented Jul 25, 2025

Motivation

The php-fpm request_slowlog_timeout option was not previously configured, by enabling this option

  • Slow PHP requests can be logged and traced.
  • These traces can be picked up by the php-fpm-exporter, which exposes them as Prometheus metrics.
  • This helps developers and platform engineers detect performance issues and identify problematic code paths

Changes

  • Added php-fpm.conf under images/php/ with [www] request_slowlog_timeout, slowlog as the contents.
  • Updated Dockerfile.fpm to:
    • Copy php-fpm.conf into /usr/local/etc/php-fpm.d/
    • Add ONBUILD ARG and ONBUILD ENV for BAY_PHP_FPM_REQUEST_SLOWLOG_TIMEOUT
  • Made the timeout value configurable using an environment variable.
  • Maintained default value as 10s unless overridden.

Testing

  1. Build image locally cd images/php and docker build -t test-php-fpm -f Dockerfile.fpm .

@nicksantamaria
Copy link
Contributor

I think this is looking good @aparador ! The image for this branch was built, you can see it here - https://github.com/dpc-sdp/bay/pkgs/container/bay%2Fphp-fpm/470096179?tag=pr-367

Should be OK to get the testing steps underway now 👍

@nicksantamaria
Copy link
Contributor

/build

1 similar comment
@nicksantamaria
Copy link
Contributor

/build

@nicksantamaria
Copy link
Contributor

/build

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

Successfully merging this pull request may close these issues.

3 participants