创建Timer失败, 进程退出

lin60

Timer::add的时候失败了,日志记录的错误如下,该问题不定时出现,这次运行了一个多月出现了这么一次

pid:24035 Error: Class 'Workerman\Lib\Worker' not found in /home/socket-server/Ningxia/vendor/workerman/workerman/Lib/Timer.php:88
Stack trace:
#0 /home/socket-server/Ningxia/Applications/TimerWorker/TimerWorker.php(81): Workerman\Lib\Timer::add(0, Object(Closure), Array, false)
#1 : {closure}(Object(Workerman\Connection\TcpConnection), '{"act":"create"...')
#2 /home/socket-server/Ningxia/vendor/workerman/workerman/Connection/TcpConnection.php(645): call_user_func(Object(Closure), Object(Workerman\Connection\TcpConnection), '{"act":"create"...')
#3 : Workerman\Connection\TcpConnection->baseRead(Resource id #468784, 2, Resource id #468784)
#4 /home/socket-server/Ningxia/vendor/workerman/workerman/Events/Event.php(185): EventBase->loop()
#5 /home/socket-server/Ningxia/vendor/workerman/workerman/Worker.php(2231): Workerman\Events\Event->loop()
#6 /home/socket-server/Ningxia/vendor/workerman/workerman/Worker.php(1356): Workerman\Worker->run()
#7 /home/socket-server/Ningxia/vendor/workerman/workerman/Worker.php(1188): Workerman\Worker::forkOneWorkerForLinux(Object(Workerman\Worker))
#8 /home/socket-server/Ningxia/vendor/workerman/workerman/Worker.php(1162): Workerman\Worker::forkWorkersForLinux()
#9 /home/socket-server/Ningxia/vendor/workerman/workerman/Worker.php(1490): Workerman\Worker::forkWorkers()
#10 /home/socket-server/Ningxia/vendor/workerman/workerman/Worker.php(1439): Workerman\Worker::monitorWorkersForLinux()
#11 /home/socket-server/Ningxia/vendor/workerman/workerman/Worker.php(480): Workerman\Worker::monitorWorkers()
#12 /home/socket-server/Ningxia/Applications/TimerWorker/TimerWorker.php(106): Workerman\Worker::runAll()
#13 {main}
pid:24035 Worker process terminated
pid:13136 worker exit with status 64000
3569 2 0
2个回答

walkor 打赏

定时器参数传错了,时间不能是0

  • 暂无评论
lin60

谢谢,确实是时间为0导致的,找到问题了

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