I've django application which use celery. Celery works with rabbit as broker. When i use redis in task, celery return WorkerLostError.
Command to start celery: python manage.py celeryd -BE --loglevel=INFO
Example of code:
class TestTask(Task):
def run(self):
rds = redis.Redis(db=0)
rds.set('test', '11')
val = rds.get('test')
print val
Output:
python(1674) malloc: *** error for object 0x7fdaf125e908: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
[2013-10-05 15:40:51,012: ERROR/MainProcess] Task mysites.task_tech.TestTask[4cc3053d-4e9c-4701-97ea-4a9e7ba3e902] raised exception: WorkerLostError('Worker exited prematurely (exitcode: -6).',)
Traceback (most recent call last):
File "/Users/user/Envs/TestEnv/lib/python2.7/site-packages/billiard/pool.py", line 930, in _join_exited_workers
lost_ret, ))
WorkerLostError: Worker exited prematurely (exitcode: -6).
requirements:
Django==1.4.1
celery==3.0.11
amqp==1.0.13
amqplib==1.0.2
billiard==2.7.3.32
celery==3.0.11
django-celery==3.0.11
Redis:
$ redis-server --version
Redis server v=2.6.14 sha=00000000:0 malloc=libc bits=64
rabbitmq version - 3.1.4
OSX version - 10.8.5
Why i have WorkerLostError? Any ideas?
UPD: On debian, ubuntu and some other linux systems, i've no this problem. Problem only on osx.
Epic!
I've another task in the same file which use my custom method init. I don't know why, but rename class init (or delete) decided this problem.