-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
noabort and noconntimeout don't seem to work for wp-cron #428
Comments
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 |
I now see these in the error log
Same if I use SetEnv. So, i guess those are only LSE. |
LSAPI_MAX_PROCESS_TIME cannot be overridden with request environments. |
Thank you for the clarification. Though, what is |
I guess noconntimeout can override max_execution_time maybe? |
Perhaps. I'll try to test that out soon. But if that's the case, I don't understand the point of LSAPI_MAX_PROCESS_TIME. Why not just use php max_execution_time? |
max_execution_time only count actual CPU usage time, if you have a worker block on network I/O, it will wait forever. never reach max_execution_time. LSAPI_MAX_PROCESS_TIME is another safe guard, count the time from the request start being processed. |
Ah, gotcha. Yes that makes sense, and I use LSAPI_MAX_PROCESS_TIME precisely for handling the network blocking. The issue I'm trying to solve for, in particular, is wp-cron. I've found that triggering it via "wp cron event run" is not as reliable. Likewise, triggering php cli "php /path/to/wp-cron.php" is not always reliable because some plugins rely on http headers sometimes. So I want to trigger via web request (eg wget site.com/wp-cron.php). But I'd rather have a short LSAPI_MAX_PROCESS_TIME for normal web requests (eg 10 seconds) in order to protect against stuck external requests, and a long (many minutes, or even infinite) time for wp-cron. If I can't use RewriteRule (wp-cron|backupbuddy|importbuddy).php - [E=noabort:1, E=noconntimeout:1 to override LSAPI_MAX_PROCESS_TIME, then I don't know how I can solve for this. Sure, I could have some wp hook to perhaps dynamically set max_execution_time for wp-cron requests, but that would get overriden by the short LSAPI_MAX_PROCESS_TIME. Any thoughts on how I can solve this? |
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=#
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?
The text was updated successfully, but these errors were encountered: