Skip to main content

Cannot set up PHP Slow Log

Comments

1 comment

  • TechAmigo

    Initially, locate the PHP-FPM Configuration Files, typically situated in the /etc/php/{version}/fpm directory. The primary configuration file is commonly named php-fpm.conf, and pool configurations are stored in the pool.d directory. Subsequently, modify the PHP-FPM Configuration File to set the parameters for slow logs:

    Identify the following parameters related to slow logs and customize them to suit your requirements:

    - slowlog: Path to the slow log file.
    - request_slowlog_timeout: The time (in seconds) after which a request is deemed slow and logged.

    ``
    slowlog = /var/log/php-slow.log
    request_slowlog_timeout = 5s
    ```
    Adjust the file path and timeout based on your preferences.

    After implementing these changes, restart the PHP-FPM service to apply the updated configuration.

    0

Please sign in to leave a comment.