其他分享
首页 > 其他分享> > 异步任务报错-Celery: WorkerLostError: Worker exited prematurely: signal 9 (SIGKILL)

异步任务报错-Celery: WorkerLostError: Worker exited prematurely: signal 9 (SIGKILL)

作者:互联网

现象:

  异步任务:

    测试环境正常,线上环境报错

 

使用celery 进行后端异步任务时,报错:

Celery: WorkerLostError: Worker exited prematurely: signal 9 (SIGKILL)

 

网上搜索答案:

https://intellipaat.com/community/6094/celery-workerlosterror-worker-exited-prematurely-signal-9-sigkill

主要原因是线程提前被杀死,异步任务未完成就退出了,

 

尝试修改supervisor中celery启动方式,无效

最终解决方案:

  升级依赖包版本号,

  pip uninstall celery 

  pip install celery==x.x.x

  同时也需要关注redis 的版本号,也可通过pip install -r requirements.txt对依赖包进行全部升级

 

 

  

标签:异步,SIGKILL,WorkerLostError,signal,celery,报错,pip,prematurely
来源: https://www.cnblogs.com/zj-Rules/p/11730479.html