litespeedtech / openlitespeed

Our high-performance, lightweight, open source HTTP server
https://openlitespeed.org
GNU General Public License v3.0
1.2k stars 196 forks source link

noabort and noconntimeout don't seem to work for wp-cron #428

Open nickchomey opened 3 hours ago

nickchomey commented 3 hours ago

Hi there, i have this at the very top of my site's .htaccess file, but it doesnt seem to be overriding env LSAPI_MAX_PROCESS_TIME=#

<IfModule Litespeed> 
  RewriteEngine On
  RewriteRule (wp-cron|backupbuddy|importbuddy)\.php - [E=noabort:1, E=noconntimeout:1]
</IfModule>

Nor does it work if I swap the RewriteRule with SetEnvIf Request_URI "(wp-cron|backupbuddy|importbuddy)\.php" noabort noconntimeout

Why might this be? The troubleshooting on this page says this should work. https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:run-without-timeouts#troubleshooting

Does it only work for litespeed enterprise?

nickchomey commented 3 hours ago

I see that there's apparently already noabort mechanism specifically for wp-cron here. But it doesnt seem to do anything. Perhaps it needs to be noconntimeout instead?

nickchomey commented 3 hours ago

I now see these in the error log

2024-12-01 22:45:39.448661 [INFO] [41258] Rewrite directive: <IfModule Litespeed>  bypassed.
2024-12-01 22:45:39.448665 [INFO] [41258] Invalid rewrite directive: SetEnvIf Request_URI "(wp-cron|backupbuddy|importbuddy|inf)\.php" noabort noconntimeout
2024-12-01 22:45:39.448667 [INFO] [41258] Rewrite directive: </IfModule> bypassed.

Same if I use SetEnv. So, i guess those are only LSE. But even if I just put the rewrite outside of the <IfModule Litespeed> tag, it still doesnt work