gunicorn 19.4.1版本以下使用gthread模式报错,Entry point(‘gunicorn.workers‘,’gthread‘) not found

 gunicorn版本导致使用 -k gthread 报错

在supervisor中配置gunicorn,大致为gunicorn -k gthread  -w 8 --thread 8 ****

执行时报错:Entry point(‘gunicorn.workers‘,’gthread‘) not found

搜索解决方案中,主要有

1. python2需要下载futures

使用的python 2.X,需要下载futures支持gthread模式

  2. 升级gunicorn版本至19.4.1

若已经下载futures,仍报错,查看gunicorn版本是否大于19.4.1 ,gunicorn19.4.1已修复该缺陷。

gunicorn上的issue:

https://github.com/benoitc/gunicorn/issues/1011

gunicorn官方解决方案:

https://github.com/GoogleCloudPlatform/python-compat-runtime/pull/38

Add the 'gthread' worker to the gunicorn.workers.SUPPORTED_WORKERS 

3. gunicorn配置删除 -k gthread

https://github.com/benoitc/gunicorn/pull/1538

如果不想升级版本,那么只需要删掉配置中的模式指定语句,-k gthread

gunicorn -k gthread  -w 8 --thread 8 ****    ——>  gunicorn  -w 8 --thread 8 ****

只要threads参数配置大于1 ,那么gthread 会替代sync模式

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值