Skip to content

Improve memory available detection #1712

@asyd

Description

@asyd

In

TOTAL_MEMORY = psutil.virtual_memory().total
you use psutil to known the amount of memory available.

However, in the case of the worker is launched in a cgroup with a memory limitation (memory.limit_in_bytes) the value returned by psutil is the amount of the host, not the amount available in the cgroups, there fore the worker try to use more memory than it can and the linux kernel kill it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions