status-go
status-go copied to clipboard
Memory leak when running a Matterbridge with Wakuv2
Problem
This problem was discovered while working on deployment of our Matterbridge fork developed by @endulab :+1:
- https://github.com/status-im/infra-misc/issues/250
Despite increasing host size the memory usage keep growing until the host is full and SWAPping starts:
This issue is unlikely to be in the Matterbridge code as it's a well established software, and our Waku additions are minimal.
Granted Michał SSH access to use pperf
over SSH:
-
infra-misc#87cf8427
- bridge: add nologin SSH access for [email protected] - https://github.com/status-im/matterbridge/pull/8
Created pprof reports. Already sent to @richard-ramos report with memory used.
Could be fixed by https://github.com/status-im/status-go/pull/5012
I updated bridge with the latest status-go. Let's see what happens. @jakubgs please update the bridge.
https://github.com/status-im/matterbridge/pull/8
The port 6060 was not mapped from the container:
[email protected]:/docker/matterbridge-community % grep -A5 ports docker-compose.yml
ports:
- '4343:4343'
Fixed it manually for now:
[email protected]:/docker/matterbridge-community % sudo netstat -lpnt | grep 6060
tcp 0 0 0.0.0.0:6060 0.0.0.0:* LISTEN 911/dockerd
It works over SSH tunnel: ssh -N -L 6060:0:6060 node-01.do-ams3.bridge.misc.status.im
> curl -s 0:6060/debug/pprof/cmdline | cat
/bin/matterbridge-conf=/config/matterbridge.yaml
release/0.177.x
now contains https://github.com/status-im/status-go/pull/5061
Can we update the bridge to point to 79055f10aac2a0ed97fe022329afcab52dcfcfc6
or the HEAD of release/0.177.x
? It should fix the issue.
@jakubgs I upgraded the bridge. It contains memory issue fix. Please use again this branch and lets monitor. FYI @jrainville
Thanks. I've built the updated enabling-pprof
branch and pushed the image:
[email protected]:/docker/matterbridge-community % d
CONTAINER ID NAMES IMAGE CREATED STATUS
d294d6e741df matterbridge-community statusteam/matterbridge:1.26.1-dev-wakuv2 10 seconds ago Up 8 seconds
fe68655db556 matterbridge-legacy statusteam/matterbridge:v1.26.0-status 6 weeks ago Up 10 days
Lets see what happens.
Last 3 days. Memory consumption on a constant level:
I will upgrade wakuv2 branch with a new version of status-go and turn off the profiler.