Page 1 of 2
Apache Leak Memory with ZoneMinder
Posted: Wed Jul 25, 2007 7:58 am
by cdbao
I used : CentOS 5.1 with Apache 2.2.3 +php5
with CPU 2.8 Ghz Ram 2Gb cache 2Gb
but when Run ZM for 30' It taked all my RAM.
I use Kodicom 8800R with 02 Camera are pluged in.
Anybody have patch this bugs?? Please support me.
Thanks and Regard.
PS : I research all forum and set npm-zms -to zms but nothing happens.
Posted: Wed Jul 25, 2007 8:13 am
by cordel
First there are more than two monitors configured, I see no evidence of a memory leak from any of the processes you have listed in top, you have a java app from god knows where running as root sucking up resources, along with asterisk also running as root which is a huge security risk among other things. BTW, that java app is using more memory and proc than any other process.
You don't mention how you have those monitors and buffers configured or how you even came to this conclusion. You only have 1GB RAM according to your sysinfo and top and nothing going to swap.
I suggest running ZM on it's own machine with nothing else. I think you will find that it runs fine. There is no patch for a problem that does not exist. The only problem seen is when configuring nph-zms which is a problem in Apache which is out side of our control.
I suggest you do some research next time before crying wolf.
Posted: Wed Jul 25, 2007 8:44 am
by cdbao
so if my physical always increase and so on... will my systems crash???
I wonders if I run at the same time with 08 camera , is memory will be out of range?
Anyway thanks for read and reply.
PS : ZM is the best choice for me
Posted: Wed Jul 25, 2007 9:10 am
by cordel
It seems to me you already have eight monitors configured with three in mocord or modect mode. You will only consume more if the remaining 4 monitors are switched to mocord/modect. Each monitor you have configured is taking only 39 MB of memory according to top for a total of 312 MB The impact of analysis (mocord/modect) is small in comparison at 7668k for each (x3= 23k). This does not account for all your consumed memory or even come close.
Some apps though will not remove items from memory but release them to be written over and in that case you might see it get close but never consume all the memory. If it goes to swap is when you want to be concerned.
Posted: Tue Jul 31, 2007 8:19 am
by cdbao
Sorry because I must pumb this topic.
My systems have ZM run alone with 1Gb Ram and with 04 camera registed at Web frontend.
The first system run very smoothly but after 5 - 6hours , all memory was taken by httpd - zmc (with apache account).
I dont know how can I solve this problem , and I do allthings that research in forum such as : get more share memory , pull down buffer ring (10fps) per camera , change /cgi-bin/nph-zms to zms ...but no result , Ram used still grow and take 99%.. then Swap will grow....
anybody have the same proplem , please give me your comment and solutions.
Thanks and Regard.
Posted: Tue Aug 14, 2007 12:32 pm
by hitlp
Hi,
I am using the ZM in the Debian and have the same problem cited. The RAM memory grows and when it arrives in 100% (including Swap), the process of the apache is killed. Some tip or solution? Thanks!
Posted: Tue Sep 11, 2007 5:46 pm
by cyrulution
hitlp wrote:Hi,
I am using the ZM in the Debian and have the same problem cited. The RAM memory grows and when it arrives in 100% (including Swap), the process of the apache is killed. Some tip or solution? Thanks!
I'm using ZM in Ubuntu 7.04 and get just the same problem: the memory gets flooded, when I arrive at 100% swap memory and 99% RAM I'm even not able any more to restart the machine.
After a hard reset the memory flooding increases again after a few hours and I get 10000s long MODECT events.
Help!
Posted: Wed Sep 12, 2007 12:56 pm
by cadillackid
I also have the same exact issues running on fedora core 6. it also occured under fedora core 4. the first machine was an athlon XP 2000 the current machine is a Pentium D, each with a Gig of ram.. im running 4 monitors on a PV-143 card, I have ordered a PV-149 card (for other issues).
I thought it was necessary to run apache for the wen interface to ZM to function, is there another Web server I should be running? does my web server needto reside on a different machine? can it reside on a different machine in the network?
-Christopher
Posted: Wed Sep 12, 2007 2:41 pm
by Lee Sharp
For those having the issue, are you running the nph or non nph version?
Posted: Wed Sep 12, 2007 5:02 pm
by cyrulution
Lee Sharp wrote:For those having the issue, are you running the nph or non nph version?
just zms without nph
I followed all suggestions from the Ubuntu walkthrough
http://www.zoneminder.com/forums/viewtopic.php?t=9747
Posted: Wed Sep 12, 2007 7:14 pm
by cordel
The initial report keep in mind had nothing really to do with apache other than ZM processes run as apache. The initail report was concern over the zmc and zma processes so be carefull not to get them confused.
Posted: Wed Sep 12, 2007 9:04 pm
by cadillackid
I was running NPH-ZMS, i switched to ZMS without any difference. when I reboot the system, I will be running at about 320 megs RAM usage as shown by TOP. after just 2.5 hours running im eating up 425 megs of RAM.. this is without ever opening a single viewer window. images are being rendered via a script that grabs images by ZMU and saves them to a remote location where I pick them up from my home automation system...
whats wierd is that I have listed closed to 10 processes for httpd whats the reason for so many??
-Christopher
Posted: Thu Sep 13, 2007 7:46 pm
by cyrulution
I'm trying out everything: the memory flooding does not happen, when I don't run ZM locally. It stays at about 60 % of 250 MB RAM and less than 10 % of 750 MB swap.
So the problem seems to arise as soon as console and server run at the same machine. Using ZM remotely does not fill up the local memory.
Posted: Thu Sep 13, 2007 8:10 pm
by cadillackid
when you say run console you mean log into the web interface? my ZM machine does not have X installed on it so I am loging in remotely.. and I still get the flood.. although it just fills up the available ram and I never see it go to more than 52k byyes on the swap and it doesnt seem to slow down.. im running a near constant load of .44 on the system.
-Christopher
Posted: Thu Sep 13, 2007 8:25 pm
by cyrulution
cadillackid wrote:when you say run console you mean log into the web interface? ...
-Christopher
Yes I mean log into web interface.
As I explained I get flooding of 100% swap and 97% RAM in this case after a few hours. Now logging in only remotely keeps the system running.
-Cyrus