-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
memory leak since 1.53.0 #12160
Description
Description
Since upgrade tomatrix-synapse-py3==1.53.0+focal1 from 1.49.2+bionic1 i observe memory leak on my instance.
The upgrade is concomitant to OS upgrade from Ubuntu bionic => focal / Python 3.6 to 3.8
We didn't change homeserver.yaml during upgrade
Our machine had 3 GB memory for 2 years and now 10G isn't enough.
Steps to reproduce
root@srv-matrix1:~# systemctl status matrix-synapse.service
● matrix-synapse.service - Synapse Matrix homeserver
Loaded: loaded (/lib/systemd/system/matrix-synapse.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2022-03-04 10:21:05 CET; 4h 45min ago
Process: 171067 ExecStartPre=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homese>
Main PID: 171075 (python)
Tasks: 30 (limit: 11811)
Memory: 6.1G
CGroup: /system.slice/matrix-synapse.service
└─171075 /opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml ->
I tried to change this config without success
expiry_time: 30m
syslogs says oom killer killed synapse:
Mar 4 10:20:54 XXXX kernel: [174841.111273] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/matrix-synapse.service,task=python,pid=143210,uid=114
Mar 4 10:20:54 srv-matrix1 kernel: [174841.111339] Out of memory: Killed process 143210 (python) total-vm:12564520kB, anon-rss:9073668kB, file-rss:0kB, shmem-rss:0kB, UID:114 pgtables:21244kB oom_score_adj:0
no further usefull information in homeserver.log
Version information
$ curl http://localhost:8008/_synapse/admin/v1/server_version
{"server_version":"1.53.0","python_version":"3.8.10"}
-
Version: 1.53.0
-
Install method:
Ubuntu apt repo -
Platform:
VMWare
I could be happy to help getting python stacktrack to debug this, if I have any lead how to do so.
(sorry for my english)