Page 2 of 3

Re: Increasing usage of RAM memory

Posted: Mon Jul 18, 2022 8:50 am
by mendozaLt
When are you planning to release the fix to "masses"? I would really like to try it out, since i was unable to get it from proposed ppa...

iconnor wrote: Wed Jul 13, 2022 10:54 pm I found a memleak and have fixed it. Do you want to update to my proposed ppa and test it?

sudo add-apt-repository ppa:iconnor/zoneminder-proposed
sudo apt-get update
sudo apt-get install zoneminder

Should get you a 1.36.21 version although packages are building now and I can't guarantee when they will be available.

Re: Increasing usage of RAM memory

Posted: Fri Aug 12, 2022 3:26 pm
by mendozaLt
After 2 updates (v1.36.24), Zoneminder still "eats" memory :(, must restart it to go from f.e. from 82% to 13%...
image_2022-08-12_172518666.png
image_2022-08-12_172518666.png (8.25 KiB) Viewed 5684 times

Re: Increasing usage of RAM memory

Posted: Fri Aug 12, 2022 6:14 pm
by iconnor
I can't reproduce it. I need a debug level 3 log. Go to options -> Logging -> check debug on, change level to 3. Restart zoneminder. Then send me the contents of /var/log/zm/zmc_m2.log to isaac@zoneminder.com

Re: Increasing usage of RAM memory

Posted: Sat Aug 13, 2022 7:36 am
by mendozaLt
Done.

Re: Increasing usage of RAM memory

Posted: Sat Aug 13, 2022 4:56 pm
by zSprawl
I woke up the similar issues this morning. The zoneminder process is up to 12 GB of memory (in a machine with only 12 GB total) and it's swapping 1 GB out of the 4 GB. The machine is operating fine though.

I did have an issue last night where the GUI stopped displaying, but I found the following error in the php-fpm logs:
WARNING: [pool www] server reached pm.max_children setting (50), consider raising it
I edited /etc/php-fpm.conf and increased it to 100, which resolved everything on my side. I don't think it's related to the memory though.

Re: Increasing usage of RAM memory

Posted: Mon Aug 29, 2022 7:08 pm
by mendozaLt
Wtf?

image_2022-08-29_210810160.png
image_2022-08-29_210810160.png (7.01 KiB) Viewed 5529 times

Re: Increasing usage of RAM memory

Posted: Mon Aug 29, 2022 7:19 pm
by Magic919
You might wish to rotate that.

Re: Increasing usage of RAM memory

Posted: Mon Aug 29, 2022 7:20 pm
by mendozaLt
mendozaLt wrote: Mon Aug 29, 2022 7:08 pm Wtf?


image_2022-08-29_210810160.png
Ok, probably file system was overfilled by zm logs, deleted log file, disabled debug log, seems to be ok now...

Re: Increasing usage of RAM memory

Posted: Sat Oct 01, 2022 8:14 pm
by tamahome
Are there ways to reduce memory consumption?
In early releases 1.36.*, with less memory on the server, everything was ok for me.
I added another 32GB but it didn't get any better,I see oom-kill..
10x 1920x1080 network cam[h264/265] at Mocord mode (1h) ffmpeg/passtrough, ZoneMinder v1.36.26.

Re: Increasing usage of RAM memory

Posted: Mon Oct 03, 2022 2:52 pm
by mendozaLt
Been waiting for a solution for long time :( ... but for now i just had to stop zoneminder, as i cant use it normally...

Re: Increasing usage of RAM memory

Posted: Tue Oct 04, 2022 6:53 pm
by tamahome
I think I found a temporary solution for myself, turning off the variable bitrate on the camera helped.

Re: Increasing usage of RAM memory

Posted: Wed Oct 05, 2022 6:32 pm
by marvinl2010
I had this workaround in place for 2 days and it hasn't crashed ever since.
Run command `crontab -e` in my terminal (my linux is rhel 7.9)
Then it will return a vim styled editor.
Insert a line */5 * * * * sync && echo 1 > /proc/sys/vm/drop_caches
Input`:wq` to save and exit it, then every 5 minutes on the minute, the command `sync && echo 1 > /proc/sys/vm/drop_caches` will run, and it will collect the dungling buffer/cache memory spaces, which in my case it fixes the memory leak.
I've tried to review some of the videos it saved, and didn't see any issues.

If I can view the cameras from web browsers as many as I want, I can view the saved videos, and it doesn't crash by exhausting the memory, then I'm happy with it.

Re: Increasing usage of RAM memory

Posted: Fri Oct 07, 2022 5:53 pm
by mendozaLt
Can someone guess, when i have restarted zoneminder? :mrgreen:
image_2022-10-07_195310899.png
image_2022-10-07_195310899.png (19.51 KiB) Viewed 5205 times

Re: Increasing usage of RAM memory

Posted: Sun Oct 23, 2022 1:10 pm
by Lamer
mendozaLt wrote: Mon Oct 03, 2022 2:52 pm Been waiting for a solution for long time :( ... but for now i just had to stop zoneminder, as i cant use it normally...
Have you tried to set "Maximum Image Buffer Size (frames)" to some value instead of 0? Actually the meaning and effect of this parameter is not quite clear to me, but setting this to 1000 (for exampe) may solve the problem. Anyway in "Buffers" menu you'll get the definite max "Estimated Ram Use" instead of "Unlimited".

Re: Increasing usage of RAM memory

Posted: Tue Nov 15, 2022 5:40 am
by mendozaLt
Goodmorning

I don't want to say that very loud yet, to not give false hopes... But i think after one of recent updates issue was fixed. It is already a while when I do not observe excessive memory usage... Sometimes it is more, sometimes less, but not all server memory, as it was before...