Supervisord template uses wrong celery attribute names
Summary
The supervisord.tmpl template file uses the wrong attribute names to start celery workers with.
What is the current bug behavior?
The mayan-edms upgrade process documents to create the supervisord configuration file with the following command:
sudo -u mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \
/opt/mayan-edms/bin/mayan-edms.py platformtemplate supervisord | sudo sh -c "cat > /etc/supervisor/conf.d/mayan-edms.conf"
The thereby created configuration file will start celery workers setting these two arguments:
- --max_tasks_per_child
- --max_memory_per_child
As a result, celery workers fail to start, because these arguments do not exist.
What is the expected correct behavior?
Set arguments as follows:
- --max-tasks-per-child
- --max-memory-per-child
See:
- https://docs.celeryproject.org/en/stable/userguide/workers.html#max-tasks-per-child-setting
- https://docs.celeryproject.org/en/stable/userguide/workers.html#max-memory-per-child-setting
Relevant logs and/or screenshots
root@mayan:~ # cat mayan-edms-worker_a-stderr---supervisor-hwfyv3eq.log
usage: celery worker [options]
celery: error: unrecognized arguments: --max_memory_per_child=300000 --max_tasks_per_child=100
usage: celery worker [options]
celery: error: unrecognized arguments: --max_memory_per_child=300000 --max_tasks_per_child=100
usage: celery worker [options]
celery: error: unrecognized arguments: --max_memory_per_child=300000 --max_tasks_per_child=100
usage: celery worker [options]
celery: error: unrecognized arguments: --max_memory_per_child=300000 --max_tasks_per_child=100
Environment details
Key | Value |
---|---|
OS | FreeBSD 13.0-RELEASE-p1 |
python | Python 3.8.10 |
mayan-edms | 4.0.5 |
celery | 4.4.7 (cliffs) |