Skip to content

MySQL result backend defaults to BLOB which may be too short for some results (LONGBLOB) #461

@ghost

Description

I was running into errors caused by loading truncated pickled results. Specifically, I would get an EOFError (see below). I eventually figured out that the result column of the celery_taskmeta MySQL table was not able to hold all of the pickled result data. By altering the table to use LONGBLOB instead of BLOB, I was able to deal with the large results (alter table celery_taskmeta modify result LONGBLOB). Is there a way to make this the default type in the future?

[2011-08-31 13:34:13,605: ERROR/PoolWorker-1] 
Traceback (most recent call last):
  File "/home/ubuntu/w/apis/trunk/apis/celerytasks/tasks/file_task_base.py", line 293, in process
    self.process_records()
  File "/home/ubuntu/w/apis/trunk/apis/celerytasks/tasks/proxmatch_file.py", line 381, in process_records
    self.wait_results(async_result_buffer)
  File "/home/ubuntu/w/apis/trunk/apis/celerytasks/tasks/proxmatch_file.py", line 435, in wait_results
    async_result.wait()
  File "/usr/local/lib/python2.6/dist-packages/celery/result.py", line 87, in wait
    return self.get(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/celery/result.py", line 83, in get
    interval=interval)
  File "/usr/local/lib/python2.6/dist-packages/celery/backends/base.py", line 110, in wait_for
    status = self.get_status(task_id)
  File "/usr/local/lib/python2.6/dist-packages/celery/backends/base.py", line 206, in get_status
    return self.get_task_meta(task_id)["status"]
  File "/usr/local/lib/python2.6/dist-packages/celery/backends/base.py", line 227, in get_task_meta
    meta = self._get_task_meta_for(task_id)
  File "/usr/local/lib/python2.6/dist-packages/celery/backends/database.py", line 61, in _get_task_meta_for
    task = session.query(Task).filter(Task.task_id == task_id).first()
  File "/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1770, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1667, in __getitem__
    return list(res)
  File "/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1960, in instances
    rows = [process[0](row, None) for row in fetch]
  File "/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/mapper.py", line 2600, in _instance
    populate_state(state, dict_, row, isnew, only_load_props)
  File "/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/mapper.py", line 2454, in populate_state
    populator(state, dict_, row)
  File "/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/strategies.py", line 150, in new_execute
    dict_[key] = row[col]
  File "/usr/local/lib/python2.6/dist-packages/celery/db/a805d4bd.py", line 55, in process
    return loads(value)
EOFError

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions