[solved] max_execution_time not working

Discussion in 'Install/Configuration' started by Patrick Yi, Aug 27, 2014.

  1. Patrick Yi

    Patrick Yi New Member

    I have set max_execution_time to 10 seconds (confirmed it through phpinfo),
    but the script runs until it hits the Connection Timeout (2 min) or Connection Keepalive Timeout (30 seconds) which ever comes first.

    How can I make the website halt when it hits the max_execution_time?

    Thank you very much in advance :)
  2. Patrick Yi

    Patrick Yi New Member

    3 retries makes it 30 seconds.
    Is there a way to disable retries?
  3. Patrick Yi

    Patrick Yi New Member

    The function sleep doesn't count as time spent in php, so php never hit the max_execution_time.

    Instead, LSAPI_MAX_PROCESS_TIME kicked in and terminated the running php. AND litespeed determined the script needed to be ran again.

    If php max_execution time kicks in beforeLSAPI_MAX_PROCESS_TIME, then litespeed DOES NOT re-run the script.

    This is the script I used for testing max_execution_time, and it works perfectly.

    <?php
    register_shutdown_function(function() {
    echo "shutdown function called\n";
    });

    for (;;) ; // Busy wait
    ?>
  4. Michael

    Michael Administrator Staff Member

    Thanks for posting this explanation for everyone to use.

    Cheers,

    Michael

Share This Page