I’ve been searching this forum and all the www for a solution to this issue and I understand that for free accounts, there is this maximum 100 seconds HTTP response rule.
So how to enable running a PHP script that takes more than 100 seconds, without upgrading?
This is what I’ve tried:
- adding the following code in my script (found on github):
$spacer_size = 2048; // increment me until it works
echo str_pad('', (1024 * $spacer_size), "\n"); // send 8kb of new line to browser (default), just make sure that this new line will not affect your code.
if(ob_get_level()) ob_end_clean(); // end output buffering
sleep(110);
echo "WOW, you waited me for 110 seconds.";
- added a WAF rule for the script URL so CF will skip all options listed there (to be honestly I don’t even know if WAF has anything to do with the 100 seconds time limit)
Ideas? Can it be increased? How?