onWorkerStart方法内抛出了异常导致服务器死机

wash2018

问题描述

自定义进程,在onWorkerStart方法内抛出了异常,导致服务重复启动,占用大量磁盘读写导致服务器挂掉。这个onWorkerStart方法中不能抛出异常吗?

程序代码或配置

#799 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(1967): Workerman\Worker->stop()
#800 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(2521): Workerman\Worker::stopAll(250, Object(Error))
#801 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(1967): Workerman\Worker->stop()
#802 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(2521): Workerman\Worker::stopAll(250, Object(Error))
#803 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(1967): Workerman\Worker->stop()
#804 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(2521): Workerman\Worker::stopAll(250, Object(Error))
#805 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(1967): Workerman\Worker->stop()
#806 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(2521): Workerman\Worker::stopAll(250, Object(Error))
#807 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(1967): Workerman\Worker->stop()
#808 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(2521): Workerman\Worker::stopAll(250, Object(Error))
#809 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(1967): Workerman\Worker->stop()
#810 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(2498): Workerman\Worker::stopAll(250, Object(ErrorException))
#811 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(1484): Workerman\Worker->run()
#812 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(1402): Workerman\Worker::forkWorkersForWindows()
#813 D:\phpstudy_pro\WWW\nanjing\vendor\workerman\workerman\Worker.php(560): Workerman\Worker::forkWorkers()
600 2 0
2个回答

walkor 打赏

onWorkerStart抛异常进程会重启,如果一直抛异常就会一直重启

  • 暂无评论
ysxpark

什么服务器居然用Windows还是phpstudy

  • 暂无评论
年代过于久远,无法发表回答
×
🔝