You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an application that loads its core framework components—including the autoloader—during the workerStart phase.
Under certain conditions, if a reload is triggered while a request is concurrently being handled, we observe the following issue: Due to what appears to be a context switch (possibly caused by file I/O during autoloader initialization), and because the worker has already registered onPipeReceive, it begins processing the incoming request before the framework code is fully loaded. This results in runtime errors such as: Class "%s" not found
We are considering a workaround where set enable_coroutine=false before server start and enabled in workerStart (need some hook), to ensure the framework initialization completes without interruption. However, similar race conditions may still occur in application-level code.
Are there any recommended best practices to mitigate this issue, especially around coroutine scheduling and safe initialization during reload?