Logic of worker's reload have mistake - please check
webrobot1 opened this issue · comments
Roadmap is
- master check workers status in monitorWorkersForLinux by pcntl_wait function
- Get pid of worker who exit
- if master's status is not STATUS_SHUTDOWN it fork byself by forkWorkers (like reload always, without check is worker have "reloadable" property)
- new worker who is realoded start event loop (as same)
- master return back and execute reload function, execute onMasterReload
- reload ALL children workers who have reloadable property (put they pid to reloadable_pid_array) with SIGKILL signal on timeout
- "Send reload signal to a worker process which reloadable is false."
Well the problem is - worker who have exit every time forked
After this ALL childrens try to reload - these childrens maybe work good and they dont need reload, and the child who was fork but dont have reloadable property reload too...
I'm sorry, but I really can't understand where your question is.
I'm sorry, but I really can't understand where your question is.
it is normal what workers always reload when one of them exit ? and these worker too doesnt matter is it have reloadable property or not
it is normal what workers always reload when one of them exit ?
We haven't been able to reproduce that. Could you provide an example, please?
it is normal what workers always reload when one of them exit ?
We haven't been able to reproduce that. Could you provide an example, please?
This is video example
2023-07-22-15-21-02.mp4
From your video, I can see that a worker was killed and the main process restarted a new one. This is not a problem. What result are you expecting?
From your video, I can see that a worker was killed and the main process restarted a new one. This is not a problem. What result are you expecting?
what different if worker wil get public property reloadable=true
or reloadable=false
? as i understand if reloadable=false
it mean it will not reload after master check what it is dead and if no another workers - master finish too
when run command php start.php reload
,the workers with reloadable=false not exit.
when run command
php start.php reload
,the workers with reloadable=false not exit.
this is very consfuse what reloadable relaod worker after his exit - i have a case then worker finish on error and i was belive that flag reloadable=false
will not reload him after finish
may be good idea add property restart
and if worker is finish do not reload it.
This feature is not useful for the majority of users, and workerman will not support it.
ok , thanks for feedback