Skip to content

ofelia eating up my memory, system running out of memory #5807

@rpasing

Description

@rpasing

Contribution guidelines

I've found a bug and checked that ...

  • ... I understand that not following the below instructions will result in immediate closure and/or deletion of my issue.
  • ... I have understood that this bug report is dedicated for bugs, and not for support-related inquiries.
  • ... I have understood that answers are voluntary and community-driven, and not commercial support.
  • ... I have verified that my issue has not been already answered in the past. I also checked previous issues.

Description

Recently, ofelia seems to be eating more and more memory on my machine over time, eventually leading to an out-of-memory situation on my machine. It looks like a memory leak with ~20-30MByte/10minutes (2-3MByte/minute), which is of course not a lot, but with a long runtime I run into trouble on my 16G memory machine.

I am running mailcow on this machine in the same setup since a couple of years already. This issue though seems to be new - I cannot exactly tell since when, but not longer than a couple of weeks for sure. I see there are no changes done on mailcow since Feb 15th, so I would suspect this is an issue within ofelia or docker itself, but I don't know where to start digging, and hope to find other affected users here.

Take a look at the VSZ and RSS columns in the below output, which has been taken from within the ofelia-mailcow container. Basically, we can see that the memory footprint of the ofelia process is increasing over time.

I also checked other logs (e.g. docker-compose log of the ofelia container), but I didn't find anything suspicious (i.e. errors or something like that).

Logs:

# while [ true ] ; do date; ps aux --sort=-%mem | head -n 2 ; sleep 600; done
Wed Mar 27 02:12:52 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 20.6 4703396 3295552 ?     Ssl  Mar26   3:52 /usr/bin/ofelia daemon --docker
Wed Mar 27 02:22:52 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 20.6 4703396 3295808 ?     Ssl  Mar26   3:54 /usr/bin/ofelia daemon --docker
Wed Mar 27 02:32:52 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 20.9 4770040 3348032 ?     Ssl  Mar26   3:55 /usr/bin/ofelia daemon --docker
Wed Mar 27 02:42:53 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 21.0 4770040 3368512 ?     Ssl  Mar26   3:57 /usr/bin/ofelia daemon --docker
Wed Mar 27 02:52:53 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 21.3 4836684 3410496 ?     Ssl  Mar26   3:59 /usr/bin/ofelia daemon --docker
Wed Mar 27 03:02:53 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 21.4 4836684 3431488 ?     Ssl  Mar26   4:00 /usr/bin/ofelia daemon --docker
Wed Mar 27 03:12:53 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 21.6 4903328 3463104 ?     Ssl  Mar26   4:02 /usr/bin/ofelia daemon --docker
Wed Mar 27 03:22:53 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 21.7 4903328 3483328 ?     Ssl  Mar26   4:03 /usr/bin/ofelia daemon --docker
Wed Mar 27 03:32:53 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 21.9 4969972 3504576 ?     Ssl  Mar26   4:05 /usr/bin/ofelia daemon --docker
Wed Mar 27 03:42:53 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 21.9 4969972 3504576 ?     Ssl  Mar26   4:07 /usr/bin/ofelia daemon --docker
# Unfortunately had to switch consoles, so a 20 minute gap to the next one:
Wed Mar 27 04:00:47 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 22.1 4969972 3545920 ?     Ssl  Mar26   4:10 /usr/bin/ofelia daemon --docker
Wed Mar 27 04:10:47 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 22.3 5036616 3577280 ?     Ssl  Mar26   4:11 /usr/bin/ofelia daemon --docker
Wed Mar 27 04:20:47 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 22.3 5036616 3577280 ?     Ssl  Mar26   4:13 /usr/bin/ofelia daemon --docker
Wed Mar 27 04:30:48 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 22.4 5036616 3598144 ?     Ssl  Mar26   4:14 /usr/bin/ofelia daemon --docker
Wed Mar 27 04:40:48 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 22.4 5036616 3598144 ?     Ssl  Mar26   4:16 /usr/bin/ofelia daemon --docker
Wed Mar 27 04:50:48 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 22.6 5036616 3618624 ?     Ssl  Mar26   4:18 /usr/bin/ofelia daemon --docker
Wed Mar 27 05:00:48 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 22.6 5036616 3618880 ?     Ssl  Mar26   4:19 /usr/bin/ofelia daemon --docker
Wed Mar 27 05:10:48 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 22.8 5103260 3660608 ?     Ssl  Mar26   4:21 /usr/bin/ofelia daemon --docker
Wed Mar 27 05:20:48 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 23.0 5103260 3681088 ?     Ssl  Mar26   4:23 /usr/bin/ofelia daemon --docker
Wed Mar 27 05:30:48 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 23.0 5169904 3681856 ?     Ssl  Mar26   4:24 /usr/bin/ofelia daemon --docker
Wed Mar 27 05:40:48 PM CET 2024
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        2919  0.2 23.1 5169904 3702336 ?     Ssl  Mar26   4:26 /usr/bin/ofelia daemon --docker

Steps to reproduce:

1. docker-compose up -d
1. docker-compose exec ofelia-mailcow sh
1. while [ true ] ; do date; ps -o pid,vsz,rss,args | head -n 2 ; sleep 600; done

Which branch are you using?

master

Which architecture are you using?

x86

Operating System:

Arch Linux

Server/VM specifications:

16G memory, 4 cores

Is Apparmor, SELinux or similar active?

no

Virtualization technology:

KVM (Hetzner Cloud Server)

Docker version:

26.0.0 (also happened with 25.0.4, upgraded 2 days ago)

docker-compose version or docker compose version:

latest

mailcow version:

2024-02

Reverse proxy:

Nginx

Logs of git diff:

Nothing related to ofelia, only data/conf/nginx, data/conf/sogo and data/web

Logs of iptables -L -vn:

Doesn't seem relevant

Logs of ip6tables -L -vn:

Doesn't seem relevant

Logs of iptables -L -vn -t nat:

Doesn't seem relevant

Logs of ip6tables -L -vn -t nat:

Doesn't seem relevant

DNS check:

104.18.32.7
172.64.155.249

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions