Skip to content

bug: zombie processes accumulation in containers #2237

@frafra

Description

@frafra

Describe the bug

Dagu does not reap orphaned child processes, thus filling up the system with zombie processes, accumulating over time if Dagu is PID 1 (like in Docker/Kubernetes).

To Reproduce

Steps to reproduce the behavior:

  1. Create a dummy dag and schedule it every second
  2. Run the dagu Docker image with the dag mounted

Expected behavior

It should continue to work.

Actual behavior

After few hours there are no more process IDs available.
It stops after having spawned ~28.000 processed on my Ubuntu machine with Docker.

This message start to appear in the logs:

runtime: failed to create new OS thread (have 8 already; errno=11)
runtime: may need to increase max user processes (ulimit -u)
fatal error: newosproc

Environment

  • Dagu version: 2.6.9
  • OS: Ubuntu 22.04
  • Go version: 1.62.2
  • Installation method: Docker

Workaroudn

Use init: true in docker-compose.yml or --init in docker run.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions