我正在使用芹菜3.1.9和sqs。我有工作人员common_w作为守护进程运行。它适用于sqs上的公共队列。 工人意外停止处理任务。没有例外和错误。
带有-l DEBUG选项的最后日志:
[2014-09-03 21:01:14,766: DEBUG/MainProcess] Method: GET
[2014-09-03 21:01:14,767: DEBUG/MainProcess] Path: /684818426251/dev_common_w_ip-10-84-163-209-celery-pidbox
[2014-09-03 21:01:14,767: DEBUG/MainProcess] Data:
[2014-09-03 21:01:14,767: DEBUG/MainProcess] Headers: {}
[2014-09-03 21:01:14,767: DEBUG/MainProcess] Host: eu-west-1.queue.amazonaws.com
[2014-09-03 21:01:14,767: DEBUG/MainProcess] Port: 443
[2014-09-03 21:01:14,767: DEBUG/MainProcess] Params: {'Action': 'ReceiveMessage', 'Version': '2012-11-05', 'MaxNumberOfMessages': 10}
[2014-09-03 21:01:14,767: DEBUG/MainProcess] Token: None
[2014-09-03 21:01:14,767: DEBUG/MainProcess] CanonicalRequest:
GET
/684818426251/dev_common_w_ip-10-84-163-209-celery-pidbox
Action=ReceiveMessage&MaxNumberOfMessages=10&Version=2012-11-05
host:eu-west-1.queue.amazonaws.com
x-amz-date:20140903T170114Z
host;x-amz-date
e3b0c44298fc1c149afbf4c899sdfasf32wefwef49b934ca495991b7852b855
[2014-09-03 21:01:14,768: DEBUG/MainProcess] StringToSign:
AWS4-HMAC-SHA256
20140903T170114Z
20140903/eu-west-1/sqs/aws4_request
9a9761b49ba9a06e469bwkfj48u83yghkhejwejlr8fce8eb078ac8c4c9ffd9e
[2014-09-03 21:01:14,768: DEBUG/MainProcess] Signature:
2de3c082bc6f01f5d5ecd66b6r89283ryuu8j8rrdaf0c40eba6cc0ceb62df6e
[2014-09-03 21:01:14,824: DEBUG/MainProcess] <?xml version="1.0"?><ReceiveMessageResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><ReceiveMessageResult/><ResponseMetadata><RequestId>4712119a-38ca-51b4-bfd1-5d1f8fu8uc4</RequestId></ResponseMetadata></ReceiveMessageResponse>
[2014-09-03 21:01:14,824: INFO/MainProcess] Received task: skazka.sender.tasks.wait_action_worker[f84c52fe-8748-4c81-b718-f23f23fasdgbg34g]
[2014-09-03 21:01:14,824: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x21666e0> (args:('skazka.sender.tasks.wait_action_worker', 'f84c52fe-8748-4c81-b718-f23f23fasdgbg34g', (1967L,), {}, {'utc': True, u'is_eager': False, 'chord': None, u'group': None, 'args': (1967L,), 'retries': 0, u'delivery_info': {u'priority': 0, u'redelivered': None, u'routing_key': u'common', u'exchange': u'common'}, 'expires': None, u'hostname': 'common_w@ip-10-84-163-209', 'task': 'skazka.sender.tasks.wait_action_worker', 'callbacks': None, u'correlation_id': u'f84c52fe-8748-4c81-b718-f23f23fasdgbg34g', 'errbacks': None, 'timelimit': (None, None), 'taskset': None, 'kwargs': {}, 'eta': None, u'reply_to': u'07a91182-23a6-3afb-b3cc-70a2fa3fw333', 'id': 'f84c52fe-8748-4c81-b718-f23f23fasdgbg34g', u'headers': {}}) kwargs:{})
更新: strace说:
futex(0x7ffff79b3e00, FUTEX_WAIT_PRIVATE, 2, NULL) = 0
enter code here
然后我在配置中设置:
CELERYD_FORCE_EXECV = True
直到它正常工作......