hyperf/gotask

启动gotask成功,但仍然报错received system call:interrupt, shutting down

Closed this issue · 6 comments

yzdzh commented

报错来源于go这边的main函数中的
if err := gotask.Run(); err != nil {
log.Fatalln(err)
}

这说明程序的bug。。。

yzdzh commented

试过直接拉下你的代码后直接run也是一样会报这个错,但是实际go进程貌似没受到影响,还是正常运行

试过直接拉下你的代码后直接run也是一样会报这个错,但是实际go进程貌似没受到影响,还是正常运行

是你的go程序panic导致端口close wait

yzdzh commented

在gotask.Run()这个环节遇到panic的话应该go进程启动不了的吧?

在gotask.Run()这个环节遇到panic的话应该go进程启动不了的吧?

启动不了,另外我这边压测没有任何问题。你可以试试在干净的环境里测试。

[INFO] Worker#10 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\GoTask\Listener\OnWorkerStartListener listener.
[INFO] Worker#11 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\GoTask\Listener\OnWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[INFO] Process[gotask.0] start.
[DEBUG] Event Hyperf\Process\Event\BeforeProcessHandle handled by Hyperf\Process\Listener\LogBeforeProcessStartListener listener.
[DEBUG] Event Hyperf\Process\Event\BeforeProcessHandle handled by Hyperf\Server\Listener\InitProcessTitleListener listener.

在gotask.Run()这个环节遇到panic的话应该go进程启动不了的吧?

启动不了,另外我这边压测没有任何问题。你可以试试在干净的环境里测试。

[INFO] Worker#10 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\GoTask\Listener\OnWorkerStartListener listener.
[INFO] Worker#11 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\GoTask\Listener\OnWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[INFO] Process[gotask.0] start.
[DEBUG] Event Hyperf\Process\Event\BeforeProcessHandle handled by Hyperf\Process\Listener\LogBeforeProcessStartListener listener.
[DEBUG] Event Hyperf\Process\Event\BeforeProcessHandle handled by Hyperf\Server\Listener\InitProcessTitleListener listener.