mrlt8 / docker-wyze-bridge

WebRTC/RTSP/RTMP/LL-HLS bridge for Wyze cams in a docker container
GNU Affero General Public License v3.0
2.47k stars 151 forks source link

Memory leak on docker using docker desktop on arm64 / Mac M2 #1004

Closed seangphoto closed 7 months ago

seangphoto commented 9 months ago

Installing the docker image using docker run command: docker run --restart always -p 8554:8554 -p 8888:8888 -p 5000:5000 mrlt8/wyze-bridge

image launches successfully and works wonderfully, but eventually crashes the docker container, memory leaks up to 9GB, takes about 10-15 mins to reach 1GB, 4 cameras including 1- 2k camera.

what might be causing this behavior? running docker on a M2 Mac Mini (arm64, I guess)

Thank you for any help! (screenshots attached)

Screen Shot 2023-09-19 at 7 40 14 PM Screen Shot 2023-09-19 at 7 39 04 PM
mrlt8 commented 9 months ago

Hmm, I haven't seen this issue. Is this v2.3.17? Can you post any configurations you might have in your docker-compose.yml?

seangphoto commented 9 months ago

Hello,

Yes it is 2.3.17, just upgraded. 2.3.16 did the same.

There are no docker-compose.yml options.

On Sep 20, 2023, at 8:55 AM, mrlt8 @.***> wrote:

Hmm, I haven't seen this issue. Is this v2.3.17? Can you post any configurations you might have in your docker-compose.yml?

— Reply to this email directly, view it on GitHub https://github.com/mrlt8/docker-wyze-bridge/issues/1004#issuecomment-1727784589, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYWCAJYKQFRO4ZYHLR2VICDX3LYTNANCNFSM6AAAAAA47C5ALU. You are receiving this because you authored the thread.

mrlt8 commented 9 months ago

Is this with just the WebUI open or are you streaming from the cameras via RTSP and/or HLS?

seangphoto commented 9 months ago

Streaming via RTSP to a scrypted server. Web UI was open also, but closing did not appear to change memory usage. 4 cameras total, including one 2k camera.

On Sep 20, 2023, at 9:11 AM, mrlt8 @.***> wrote:

Is this with just the WebUI open or are you streaming from the cameras via RTSP and/or HLS?

— Reply to this email directly, view it on GitHub https://github.com/mrlt8/docker-wyze-bridge/issues/1004#issuecomment-1727814670, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYWCAJY2LNPUDABQXVNMH6LX3L2PLANCNFSM6AAAAAA47C5ALU. You are receiving this because you authored the thread.

finity69x2 commented 9 months ago

I'm not sure if it is related but I had a similar situation after installing via docker (not using docker compose but just using the docker command under the quickstart section).

everything ran OK at first then a few hours later (I initially installed the wyze-bridge at around 1 pm I think) my cpu usage on the Debian host shot up from around 10-15% normal usage to 60% and stayed there.

image

also at the same time my disk usage went up fairly quickly from a normal of 40% to 80%.

image

it was lucky that I happened to see it and I took measures to stop it before it crashed the host.

I wasn't sure what the problem was at first so I eventually ended up rebooting the host machine. That at least got the cpu usage back to normal but the excessive disk usage remained.

I finally was able to track it down this morning to the wyze-bridge container.

As soon as I removed that container the disk usage went back down again to normal (as seen in the screen shot above).

I have no idea what happened at 6:37 PM to cause it.

Related question...

what is the volume variable to create a volume bind mount for the wyze-bridge config?

part of the reason I didn't find the problem at first was that I typically manually create a directory that all of my individual containers put their config into.

example is "-v /home/finity/docker/wireguard/config:/config"

image

the only container I didn't have in the docker config directory was the wyze-bridge container so it wrote all of the fault logs to /var/lib/docker/ so it took me a while figure out it was the problem.