Celery 3.0.1 中的框架错误

Framing Errors in Celery 3.0.1(Celery 3.0.1 中的框架错误)
本文介绍了Celery 3.0.1 中的框架错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我最近从 2.3.0 升级到 Celery 3.0.1,所有任务都运行良好.很遗憾.我经常收到框架错误"异常.我也在运行主管来重新启动线程,但由于这些线程从未真正被杀死,主管无法知道需要重新启动芹菜.有人见过这个吗?

I recently upgraded to Celery 3.0.1 from 2.3.0 and all the tasks run fine. Unfortunately. I'm getting a "Framing Error" exception pretty frequently. I'm also running supervisor to restart the threads but since these are never really killed supervisor has no way of knowing that celery needs to be restarted. Has anyone seen this before?

2012-07-13 18:53:59,004: ERROR/MainProcess] Unrecoverable error: Exception('Framing Error, received 0x00 while expecting 0xce',)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/celery/worker/__init__.py", line 350, in start
    component.start()
  File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 360, in start
    self.consume_messages()
  File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 445, in consume_messages
    drain_nowait()
  File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 175, in drain_nowait
    self.drain_events(timeout=0)
  File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 171, in drain_events
    return self.transport.drain_events(self.connection, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/amqplib.py", line 262, in drain_events
    return connection.drain_events(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/amqplib.py", line 97, in drain_events
    chanmap, None, timeout=timeout)
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/amqplib.py", line 155, in     _wait_multiple
    channel, method_sig, args, content = read_timeout(timeout)
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/amqplib.py", line 129, in read_timeout
    return self.method_reader.read_method()
  File "/usr/local/lib/python2.7/dist-packages/amqplib/client_0_8/method_framing.py", line 221, in read_method
    raise m
Exception: Framing Error, received 0x00 while expecting 0xce

推荐答案

虽然我不确定为什么会发生这种情况,但从 amqplib 切换到 librabbitmq 帮助我克服了这个麻烦.

While I am not sure why this actually happens, switching from amqplib to librabbitmq helped me to overcome this trouble.

我没有更改任何配置,只是:

I haven't changed anything in configuration, just:

pip uninstall amqplib
pip install librabbitmq

并重新启动芹菜工人.

得到这个想法的形式 https://github.com/celery/celery/issues/922

这篇关于Celery 3.0.1 中的框架错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Seasonal Decomposition of Time Series by Loess with Python(Loess 用 Python 对时间序列进行季节性分解)
Resample a time series with the index of another time series(使用另一个时间序列的索引重新采样一个时间序列)
How can I simply calculate the rolling/moving variance of a time series in python?(如何在 python 中简单地计算时间序列的滚动/移动方差?)
How to use Dynamic Time warping with kNN in python(如何在python中使用动态时间扭曲和kNN)
Keras LSTM: a time-series multi-step multi-features forecasting - poor results(Keras LSTM:时间序列多步多特征预测 - 结果不佳)
Python pandas time series interpolation and regularization(Python pandas 时间序列插值和正则化)