Apache Leak Memory with ZoneMinder

Support and queries relating to all previous versions of ZoneMinder
cdbao
Posts: 35
Joined: Mon Feb 26, 2007 7:51 am

Apache Leak Memory with ZoneMinder

Post 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.
Image
Image
Last edited by cdbao on Tue Jul 31, 2007 8:20 am, edited 1 time in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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.
cdbao
Posts: 35
Joined: Mon Feb 26, 2007 7:51 am

Post 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 :)
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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.
cdbao
Posts: 35
Joined: Mon Feb 26, 2007 7:51 am

Post 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.
hitlp
Posts: 1
Joined: Fri Aug 10, 2007 12:40 pm

Post 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!
- Ubuntu 7.04 -
cyrulution
Posts: 52
Joined: Sat Jul 28, 2007 12:27 pm
Location: Kinzweiler, Germany and Beith, Scotland

Post 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!
Serenity is not freedom from storm; it's peace within the storm
cadillackid
Posts: 15
Joined: Mon Jul 09, 2007 6:10 pm
Location: Columbus Ohio
Contact:

Post 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
If you cant Hook it up, Transmit to it, Receive from it, or Squeal the tires on it i dont want it.
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

For those having the issue, are you running the nph or non nph version?
cyrulution
Posts: 52
Joined: Sat Jul 28, 2007 12:27 pm
Location: Kinzweiler, Germany and Beith, Scotland

Post 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
Serenity is not freedom from storm; it's peace within the storm
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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.
cadillackid
Posts: 15
Joined: Mon Jul 09, 2007 6:10 pm
Location: Columbus Ohio
Contact:

Post 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
If you cant Hook it up, Transmit to it, Receive from it, or Squeal the tires on it i dont want it.
cyrulution
Posts: 52
Joined: Sat Jul 28, 2007 12:27 pm
Location: Kinzweiler, Germany and Beith, Scotland

Post 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.
Serenity is not freedom from storm; it's peace within the storm
cadillackid
Posts: 15
Joined: Mon Jul 09, 2007 6:10 pm
Location: Columbus Ohio
Contact:

Post 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
If you cant Hook it up, Transmit to it, Receive from it, or Squeal the tires on it i dont want it.
cyrulution
Posts: 52
Joined: Sat Jul 28, 2007 12:27 pm
Location: Kinzweiler, Germany and Beith, Scotland

Post 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
Serenity is not freedom from storm; it's peace within the storm
Locked