Maxopenfile reached & machine hangs zm problem ?
Maxopenfile reached & machine hangs zm problem ?
Hi to all
I'm using archlinux from the livecd I'm now using 4 cams:
1-Gadspot (mjpeg)
2- Desecurity cam (rtsp)
3- icamview ptz (with icamview proxy)
4- Icamview cam (icamview proxy)
Wha is happening is that after a few hours of working my machine get max open file reached 58700.. and this what is really configured in /proc/sys/fs/file-max.
I tried to increase this but on reboot i get the same number on file-max.
The issue is that why do i have 58700 open is this an apache bug ?
because if i do a lsof i don't have 58700 file opened....
any clue ??
thanks
I'm using archlinux from the livecd I'm now using 4 cams:
1-Gadspot (mjpeg)
2- Desecurity cam (rtsp)
3- icamview ptz (with icamview proxy)
4- Icamview cam (icamview proxy)
Wha is happening is that after a few hours of working my machine get max open file reached 58700.. and this what is really configured in /proc/sys/fs/file-max.
I tried to increase this but on reboot i get the same number on file-max.
The issue is that why do i have 58700 open is this an apache bug ?
because if i do a lsof i don't have 58700 file opened....
any clue ??
thanks
Last edited by fc on Fri Apr 10, 2009 2:25 pm, edited 1 time in total.
somthing to do with ZM..
after 10 hours uptime i have this
"
[root@zmhost shm]# cat /proc/sys/fs/file-nr
40704 0 50837
"
then i do this
[root@zmhost shm]# /etc/rc.d/zm stop
:: Stopping ZoneMinder [DONE]
[root@zmhost shm]# cat /proc/sys/fs/file-nr
896 0 50837
and my open files come down to 896 ???
why ? any1 knows ?
thanks
after 10 hours uptime i have this
"
[root@zmhost shm]# cat /proc/sys/fs/file-nr
40704 0 50837
"
then i do this
[root@zmhost shm]# /etc/rc.d/zm stop
:: Stopping ZoneMinder [DONE]
[root@zmhost shm]# cat /proc/sys/fs/file-nr
896 0 50837
and my open files come down to 896 ???
why ? any1 knows ?
thanks
-
- Posts: 9
- Joined: Tue Mar 24, 2009 6:11 am
fc,
It could be the FD_SETSIZE in one of the dependencies (set when compiling). This flag also controls the maximum files. But I've gone crazy in the past trying to hunt down similar problems. Take a look at all the sysctl values tho, you're likely to find something there too (i.e. maxfiles and maxfilesproc).
It could be the FD_SETSIZE in one of the dependencies (set when compiling). This flag also controls the maximum files. But I've gone crazy in the past trying to hunt down similar problems. Take a look at all the sysctl values tho, you're likely to find something there too (i.e. maxfiles and maxfilesproc).
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
There should be no reason why ZM should have so many files open. Nor should apache have any ZM files open unless you are actively using the interface.
Perhaps you could experiment by seeing what the number does if you don't use the web interface for instance. Also if you switch off certain monitors in case it is an issue withthe proxy for example.
Perhaps you could experiment by seeing what the number does if you don't use the web interface for instance. Also if you switch off certain monitors in case it is an issue withthe proxy for example.
Phil
i don't know where are the open files, because if i do "lsof" they don't apear...
This issue occurs even without any interface interaction...
Until i found whats up i scheduled zm restart every night at 4am...
Any clue where to check the open files ? something to with /dev/shm ?
This issue occurs even without any interface interaction...
Until i found whats up i scheduled zm restart every night at 4am...
Any clue where to check the open files ? something to with /dev/shm ?
zoneminder wrote:There should be no reason why ZM should have so many files open. Nor should apache have any ZM files open unless you are actively using the interface.
Perhaps you could experiment by seeing what the number does if you don't use the web interface for instance. Also if you switch off certain monitors in case it is an issue withthe proxy for example.
Do you leave the Montage view open?
I have a similar problem in CentOS, if I leave the Montage view open in a browser it will generate hundreds of httpd processes each with files open......this eventually hits either the apache maximum if I set ti low enough of hangs when it runs out of file handles.
I am not sure what causes this, but I am beging to believe it might be a bug in the montage code.
I have a similar problem in CentOS, if I leave the Montage view open in a browser it will generate hundreds of httpd processes each with files open......this eventually hits either the apache maximum if I set ti low enough of hangs when it runs out of file handles.
I am not sure what causes this, but I am beging to believe it might be a bug in the montage code.
- henriquejf
- Posts: 77
- Joined: Tue Feb 10, 2009 12:01 pm
- Location: Brazil
related topics
Maybe you can find these usefull posts regarding the same simptoms,
* apache hanging (this topic)
** maxopenfile reached:: http://www.zoneminder.com/forums/viewtopic.php?t=13486
** apache not responding:: http://www.zoneminder.com/forums/viewtopic.php?t=13322
** Apache instances/responsiveness issue...solved:: http://www.zoneminder.com/forums/viewto ... c&start=15
I modestly think that there should be a way to "elegantly" close the montage view, so that related zms childs would close for sure; I think my problem is related to yours because after letting the montage open for more than 2 minutes gives me problems; i am actively trying to have that solved, but still no success;
* apache hanging (this topic)
** maxopenfile reached:: http://www.zoneminder.com/forums/viewtopic.php?t=13486
** apache not responding:: http://www.zoneminder.com/forums/viewtopic.php?t=13322
** Apache instances/responsiveness issue...solved:: http://www.zoneminder.com/forums/viewto ... c&start=15
I modestly think that there should be a way to "elegantly" close the montage view, so that related zms childs would close for sure; I think my problem is related to yours because after letting the montage open for more than 2 minutes gives me problems; i am actively trying to have that solved, but still no success;
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
- henriquejf
- Posts: 77
- Joined: Tue Feb 10, 2009 12:01 pm
- Location: Brazil
duplicated topics
In an effort to solve, or even organize related problems, i am asking users experiencing **APACHE HANGS** to double check what has been tried before by other users, so we don´t loose our time and get things working as expected;
I am not even sure that it is a ZM bug, but i am sure that many people have to restart apache from time to time, just as me; One user found it useful to restart apache as a cron job every x minutes, another user proposed to use http://jzmconsole.securitykit.net/ as a workaround for the problem when it happens in the montage view, but i am sure that we´ll have that fixed soon by the community, so we don´t have to give up and try the mentioned workarounds;
apache hanging problems - related, duplicated (or not) topics
==============================================================
** Maxopenfile reached & machine hangs zm problem ?
http://www.zoneminder.com/forums/viewtopic.php?t=13486
** apache not responding
http://www.zoneminder.com/forums/viewtopic.php?t=13322
** Apache instances/responsiveness issue...solved(?)
http://www.zoneminder.com/forums/viewto ... c&start=15
** Zoneminder UNSTABLE & HANGS, needs frequent restarting
http://www.zoneminder.com/forums/viewto ... 1196#51196
** hundreds of httpd processes
http://www.zoneminder.com/forums/viewtopic.php?t=13588
If some experienced programmer could give us a light, it would be so kind !!
I am not even sure that it is a ZM bug, but i am sure that many people have to restart apache from time to time, just as me; One user found it useful to restart apache as a cron job every x minutes, another user proposed to use http://jzmconsole.securitykit.net/ as a workaround for the problem when it happens in the montage view, but i am sure that we´ll have that fixed soon by the community, so we don´t have to give up and try the mentioned workarounds;
apache hanging problems - related, duplicated (or not) topics
==============================================================
** Maxopenfile reached & machine hangs zm problem ?
http://www.zoneminder.com/forums/viewtopic.php?t=13486
** apache not responding
http://www.zoneminder.com/forums/viewtopic.php?t=13322
** Apache instances/responsiveness issue...solved(?)
http://www.zoneminder.com/forums/viewto ... c&start=15
** Zoneminder UNSTABLE & HANGS, needs frequent restarting
http://www.zoneminder.com/forums/viewto ... 1196#51196
** hundreds of httpd processes
http://www.zoneminder.com/forums/viewtopic.php?t=13588
If some experienced programmer could give us a light, it would be so kind !!
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
- henriquejf
- Posts: 77
- Joined: Tue Feb 10, 2009 12:01 pm
- Location: Brazil
I am currently using 1.24.1 SVN as of april 14th, 2009;
(I have searched into /usr/src/zm to get the exact svn number I used but i wasnt able /didnt find out how even searching the web);
anyway, ill try the ubuntu guide available on the wiki once again, use the newer SVN and make my prays; iĺl be advising what i got by tomorrow;
I knew that when this problem started to get popular a big chief like you would come and help us poor people; TKS so much for your and the community efforts !!!
(I have searched into /usr/src/zm to get the exact svn number I used but i wasnt able /didnt find out how even searching the web);
anyway, ill try the ubuntu guide available on the wiki once again, use the newer SVN and make my prays; iĺl be advising what i got by tomorrow;
I knew that when this problem started to get popular a big chief like you would come and help us poor people; TKS so much for your and the community efforts !!!
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
ive released an updated version of my patch which may solve some of this issue it is at:
http://www.zoneminder.com/forums/viewto ... highlight=
If you just want the changes that could make apache behave better see the shorter patch at:
http://mitchcapper.com/zm_streams.patch
http://www.zoneminder.com/forums/viewto ... highlight=
If you just want the changes that could make apache behave better see the shorter patch at:
http://mitchcapper.com/zm_streams.patch
- henriquejf
- Posts: 77
- Joined: Tue Feb 10, 2009 12:01 pm
- Location: Brazil
Can you inform us non-developers how to apply a patch like this?mitch wrote:ive released an updated version of my patch which may solve some of this issue it is at:
http://www.zoneminder.com/forums/viewto ... highlight=
If you just want the changes that could make apache behave better see the shorter patch at:
http://mitchcapper.com/zm_streams.patch
Thanks!