Too many open files in system

Forum for questions and support relating to the 1.24.x releases only.
Post Reply
help40
Posts: 14
Joined: Mon Sep 20, 2010 9:46 am

Too many open files in system

Post by help40 » Sat Nov 20, 2010 10:55 am

I am getting this error message in apache logs

"Too many open files in system"

is it related to zoneminder ? or not ?

any resolution?

User avatar
jdhar
Posts: 125
Joined: Fri Oct 01, 2010 9:15 pm
Location: California
Contact:

Post by jdhar » Sat Nov 20, 2010 6:20 pm

I think it's related, but I don't know the answer... reason being that I started getting this after in stalling ZM too, and haven't figured out. I just have to reboot every few days :(
eyeZm, Native iPhone App for ZoneMinder: http://www.eyezm.com

Version 1.3 now available on iTunes, introduces Montage view, HTTPS/SSL support and H264 native streaming!

Subscribe to RSS feed for updates: http://www.eyezm.com/rssfeed.xml

help40
Posts: 14
Joined: Mon Sep 20, 2010 9:46 am

Post by help40 » Sun Nov 21, 2010 12:03 am

I definatelly do not like to be babysitter of my Zoneminder ...
The problem is when someone watch monitor for too long ...

the file descriptor of the system by default is 1024
you can see it with

# ulimit -a

I hope I found the answer , I am testing it now ....
editing

apachectl (mine is here - /usr/sbin/apachectl )

and adding

ULIMIT_MAX_FILES="ulimit -n 16384"

you can also take a look here, where I found this answer :

http://serverfault.com/questions/20183/ ... -in-system

timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA
Contact:

Post by timcraig » Sun Nov 21, 2010 4:05 am

Zoneminder uses alot of open files when it's using mapped memory.

Linux has a set limit of how many files that can be opened at the same time. You can see the current limit:

Code: Select all

cat /proc/sys/fs/file-max


To change the max, you can edit the /etc/sysctl.conf. So for example, your current max is at 5000 and you want to change it to 10000. You add the line to your /etc/sysctl.conf file:

Code: Select all

fs.file-max = 100000

To make the change go into effect, you then run

Code: Select all

sysctl -p

help40
Posts: 14
Joined: Mon Sep 20, 2010 9:46 am

Post by help40 » Mon Nov 22, 2010 12:24 pm

so You suggest increasing to 100 000?

by the way this file is not present by default in Slackware , but I read that
"if you create that file /etc/sysctl.conf yourself, then slackware will automatically run "/sbin/sysctl -e -p /etc/sysctl.conf" everytime you boot."

timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA
Contact:

Post by timcraig » Mon Nov 22, 2010 10:06 pm

I increasing the file max to double the size of your current amount.

So if "cat /proc/sys/fs/file-max" returns n

Set the max to 2n



If the /etc/sysctl.conf file doesn't exist go ahead and create one.

I should have mentioned that you'll only need to run sysctl -p just to make the new settings in sysctl.conf go into effect without needing to reboot the computer. You won't have do call that program everytime you computer starts up.

help40
Posts: 14
Joined: Mon Sep 20, 2010 9:46 am

Post by help40 » Tue Nov 23, 2010 12:00 pm

I will test it , I am not sure this one will help

ulimit -n still show 1024 after that

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests