swoft
swoft copied to clipboard
定时任务异常
| Q | A |
|---|---|
| Bug report? | yes |
| Swoft version | 2.0.10 |
| Swoole version | 4.4.8 |
| PHP version | 7.2.13 |
| Runtime environment | CentOS 7 |
服务端有多个swoft服务,有时候重启失败会kill掉相关进程,A服务的bean中得httpServer配置了pidName=‘swoft-testserver-http’,重启失败就直接使用命令kill掉,因为服务器有多个服务命令为:ps -eaf |grep "testserver" | grep -v "grep"| awk '{print $2}'|xargs kill -9 执行之后再重启服务,发现定时任务多执行了一次,反复执行命令杀进程然后重启定时任务会执行更多次,原计划每十秒执行一次,重启后第十秒会执行多次,切定时任务执行http:stop也停不掉,只能执行ps -eaf |grep "swoft" | grep -v "grep"| awk '{print $2}'|xargs kill -9