Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
litespeed_wiki:php:run-without-timeouts [2019/06/06 18:20]
Jackson Zhang
litespeed_wiki:php:run-without-timeouts [2019/06/06 18:49]
Lisa Clarke [Troubleshooting ] Proofreading
Line 150: Line 150:
 **Note:** You need to turn off keepalive connections for this request. This can be done with a rewrite rule. **Note:** You need to turn off keepalive connections for this request. This can be done with a rewrite rule.
  
-====== Troubleshooting ====== +===== Troubleshooting ===== 
-====noabort rule should be placed ​on the top of the .htaccess ​===== + 
-user tres to run a timeout.php test script+==== "noabort" ​rule should be placed ​at the top of the .htaccess ==== 
 +''​test.php'' ​script ​sets sleep time to 320 seconds, like so:
  
 <​code>​ <​code>​
Line 183: Line 184:
 </​code>​ </​code>​
  
-It sets sleep time to 320 seconds, however, run https://​domain.com/​timeout.php, it will error out and stop at 300 seconds (5 mins), while https://​domain.com/phpinfo.php shows "max_exectution_time" ​is 600. LiteSpeed ​webserver has 300 second ​default ​timeout. ​However it can be overrided ​by noabort or noconntimeout rule.  +When it is run, however, it errors ​out and stops at 300 seconds (5 minutes). ''​phpinfo.php'' ​shows **max_exectution_time** is ''​600''​The script times out due to LiteSpeed ​Web Server'​s default ​300-second timeout. ​The default, however, ​can be overridden ​by a ''​noabort'' ​or ''​noconntimeout'' ​rule. 
- +
-A user tries to add noabort or noconntimeout rule to .htaccess, but seems the test script will still stop at 300 seconds+
  
-The .htaccess ​rules are:+In this example, ''​.htaccess''​ //does// have a ''​noabort''​ rule, but the test script still stops at 300 seconds:
  
 <​code>​ <​code>​
Line 295: Line 294:
 </​code>​ </​code>​
  
-The noabort rule was placed ​almost ​the end of the .htaccess and it is prevented being executed by other rules.  ​+The problem is the position of the ''​noabort'' ​rule. it was placed ​nearly at the end of ''​.htaccess'', ​and as such, it is prevented ​from being executed by the other rules that come before it.  ​
  ​RewriteRule .* - [E=noabort:​1]  ​RewriteRule .* - [E=noabort:​1]
  
-Move the rule to the very top of all rules in .htaccess and everything works fine now.+Move the rule to the very top of all ''​.htaccess''​ rewrite rules, ​and the test script will no longer time out.
  • Admin
  • Last modified: 2019/06/06 18:49
  • by Lisa Clarke