Conversation
|
Not sure this will fix it. On fatal error Line 1317 in b02d99a |
|
I could imagine that Might be necessary to completely restart the thread if |
| if (frankenphp_worker_request_startup() == FAILURE | ||
| /* Shutting down */ | ||
| || !result.r0) { | ||
| if (!result.r0 || frankenphp_worker_request_startup() == FAILURE) { | ||
| RETURN_FALSE; | ||
| } |
There was a problem hiding this comment.
This change is probably fine, seems like this order is possible due to #1814. Should keep in mind that it will affect stuff happening on worker shutdown
while(frankenphp_handle_request(...)){
# handle x requests
}
# will not reset globals for shutdown logic happening here (probably fine?)| #ifdef ZEND_MAX_EXECUTION_TIMERS | ||
| /* Disable any execution timer set during the request callback to prevent | ||
| * stale timers from firing between requests */ | ||
| zend_unset_timeout(); | ||
| #endif | ||
|
|
There was a problem hiding this comment.
I don't think this does anything. The timeout can only happen between 2 calls to frankenphp_handle_request(), where it should be save to timeout.
Disable the execution timer in frankenphp_worker_request_shutdown() to prevent stale timers from firing between requests. Also fix evaluation order in frankenphp_handle_request() to check for shutdown before calling frankenphp_worker_request_startup(). Fixes #2205 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for the review @AlliBalliBaba! Let me address each point: On
|
This is not true. The timeout potentially happens in a time window of a few micro-seconds, extremely unlikely if the timeout is 30s. And it would only affect 1 thread, not all threads. Also it wouldn't matter if it happens in the gap, as it just leads to a fatal error / worker restart when reaching the while loop.
Sry meant to say |
|
Hum ok, you look right. Let's close! |
|
#2205 might also be connected to the |
Fixes #2205. At least I hope so.
Disable the execution timer in
frankenphp_worker_request_shutdown()to prevent stale timers from firing between requests. Also, fix evaluation order infrankenphp_handle_request()to check for shutdown before callingfrankenphp_worker_request_startup().