[Closed] max_execution_time not working

Status
Not open for further replies.
#1
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 :)
 
#3
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:
<?php
register_shutdown_function(function() {
    echo "shutdown function called\n";
});

for (;;) ;         // Busy wait
?>
 
Last edited by a moderator:
Status
Not open for further replies.
Top