BCDevOps / backup-container

A simple container for a simple backup strategy.
Apache License 2.0
39 stars 56 forks source link

MongoDB backups leave zombie processes #130

Closed i5okie closed 4 weeks ago

i5okie commented 1 month ago

After executing a backup, the script leaves a zombie PID. Resulting in a growing list of zombie processes. With the current script, the process ID is lost after execution, so proper termination is not guaranteed.

    Container: backup-storage:
        PIDs:
        USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
        1005440+ 2760703  0.0  0.0  66156 10980 ?        Ss   Jun24   0:00 python3 /usr/local/bin/docker-entrypoint.py /bin/sh -c bash /backup.sh
        1005440+ 2760773  0.0  0.0  13064  4020 ?        S    Jun24   0:00  \_ bash /backup.sh
        1005440+  582762  0.0  0.0      0     0 ?        Z    Jun25   0:00  \_ [mongod] <defunct>
        1005440+ 2219271  0.0  0.0      0     0 ?        Z    Jun26   0:00  \_ [mongod] <defunct>
        1005440+ 1895422  0.0  0.0      0     0 ?        Z    Jun27   0:00  \_ [mongod] <defunct>
        1005440+ 2794725  0.0  0.0      0     0 ?        Z    Jun28   0:00  \_ [mongod] <defunct>
        1005440+ 3928064  0.0  0.0      0     0 ?        Z    Jun29   0:00  \_ [mongod] <defunct>
        1005440+  389736  0.0  0.0      0     0 ?        Z    Jun30   0:00  \_ [mongod] <defunct>
        1005440+ 1036227  0.0  0.0      0     0 ?        Z    Jul01   0:00  \_ [mongod] <defunct>
        1005440+ 1800649  0.0  0.0      0     0 ?        Z    Jul02   0:00  \_ [mongod] <defunct>
        1005440+ 2494210  0.0  0.0      0     0 ?        Z    Jul03   0:00  \_ [mongod] <defunct>
        1005440+ 2227504  0.0  0.0      0     0 ?        Z    Jul04   0:00  \_ [mongod] <defunct>
...

Potential resolution: