Download 2.3-archived PDF
Transcript
Celery Documentation, Release 2.3.5 For the task messages you can set the CELERY_TASK_SERIALIZER setting to “json” or “yaml” instead of pickle. There is currently no alternative solution for task results (but writing a custom result backend using JSON is a simple task) Note that this is not just something you should be aware of with Celery, for example also Django uses pickle for its cache client. 8.5.2 Can messages be encrypted? Answer: Some AMQP brokers supports using SSL (including RabbitMQ). You can enable this using the BROKER_USE_SSL setting. It is also possible to add additional encryption and security to messages, if you have a need for this then you should contact the Mailing list. 8.5.3 Is it safe to run celeryd as root? Answer: No! We’re not currently aware of any security issues, but it would be incredibly naive to assume that they don’t exist, so running the Celery services (celeryd, celerybeat, celeryev, etc) as an unprivileged user is recommended. 8.6 Brokers 8.6.1 Why is RabbitMQ crashing? Answer: RabbitMQ will crash if it runs out of memory. This will be fixed in a future release of RabbitMQ. please refer to the RabbitMQ FAQ: http://www.rabbitmq.com/faq.html#node-runs-out-of-memory Note: This is no longer the case, RabbitMQ versions 2.0 and above includes a new persister, that is tolerant to out of memory errors. RabbitMQ 2.1 or higher is recommended for Celery. If you’re still running an older version of RabbitMQ and experience crashes, then please upgrade! Misconfiguration of Celery can eventually lead to a crash on older version of RabbitMQ. Even if it doesn’t crash, this can still consume a lot of resources, so it is very important that you are aware of the common pitfalls. • Events. Running celeryd with the -E/--events option will send messages for events happening inside of the worker. Events should only be enabled if you have an active monitor consuming them, or if you purge the event queue periodically. • AMQP backend results. When running with the AMQP result backend, every task result will be sent as a message. If you don’t collect these results, they will build up and RabbitMQ will eventually run out of memory. If you don’t use the results for a task, make sure you set the ignore_result option: Results can also be disabled globally using the CELERY_IGNORE_RESULT setting. Note: Celery version 2.1 added support for automatic expiration of AMQP result backend results. 8.6. Brokers 127