• Resolved helpmelearnwp

    (@helpmelearnwp)


    I’ve increased maximum execution time in .htaccess last year, but the issue of CRITICAL Maximum execution time of 30 seconds exceeded is still reoccurring.

    The change I’ve made in .htaccess is:

    This addition is at the very end of .htaccess file.

    The timeout happens sporadically – about once per month. The previous one that I’ve had was:

Viewing 2 replies - 1 through 2 (of 2 total)
  • This implies your htaccess directive isn’t getting effectively executed.

    The comment says “Increase FPM max response time” yet the directive is checking for mod_php7.c. So are you running PHP as php-fpm or mod_php?

    If you’re running PHP as php-fpm (or something else entirely), then the IfModule check will return false, and the directive will be ignored.

    And if you’re running mod_php, then this might be the root of your problem, as this is unarguably the slowest way to run PHP. Switching to FPM might solve your problem at the source and negate the need to increase the PHP max_execution_time value.

    Returning to your .htaccess rule, since we’re absolutely sure we’re running PHP (else WordPress wouldn’t work at all), there’s no need for the IfModule check, so you can replace the entire block of code with just:

    php_value max_execution_time 600

    Alternatively, you can let WordPress handle this, by adding the following in your wp-config.php file:

    set_time_limit(600);

    Good luck!

    Thread Starter helpmelearnwp

    (@helpmelearnwp)

    I’ve heeded the choices that you’ve provided & decided that I should let WordPress handle the configuration to be safe. I’ve made the amendment in wp-config.php. Will be monitoring it from now.

    I have much to learn, and I’m thankful that you’ve offered a helping hand, and explained it to me. Thank you so much, @gappiah.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Max Execution Time Increased, but Timeout Error Persists’ is closed to new replies.