Skip to content

Celery max_tasks_per_child setting #6839

@a-gerhard

Description

@a-gerhard

Describe your question/
The authentik worker has max_tasks_per_child set to 1 (source code). This means that a new worker process is spawned for each task, meaning that all the imports need to be repeated for all tasks. It has nothing to do with the number of processes executed in parallel. For many small tasks, this may present a significant overhead.

According to celery documentation, this setting is only useful to avoid memory leaks. Even in such a scenario, I don't think that it makes sense to replace the worker for each task, but only after having executed a number of tasks (see here).

Is there any reason for this decision? Otherwise, I would suggest setting it higher (e.g., 50 or 100) or even disabling the limit (set to 0).

Version and Deployment (please complete the following information):

  • authentik version: 2023.8.2
  • Deployment: docker-compose

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions