Too many open files error (EMFILE)
Too many open files error (EMFILE)
- Subject: Too many open files error (EMFILE)
- From: Jaroslav Snajdr <email@hidden>
- Date: Tue, 1 Mar 2005 17:13:21 +0100
Hello!
When my application (mail server) runs for several hours, I start
getting the Too many open files error when opening new file or socket
and I don't know why.
1. The ulimit for number of open files is set to unlimited, i.e. 12288 for root on Mac OS X 10.3.8
2. lsof shows only some 900 open files.
3. pstat -T shows the same number of open files as lsof and some 9700 vnodes.
Where are all the open files? Why does the system call return the
EMFILE error? This error can be returned by the falloc() and
getnewvnode() functions in the kernel, but all system statistics show
that there is no limit exhausted.
Can this problem be related to memory leaks? Doesn't every memory region allocate a file descriptor or something?
Can it be caused by too many threads (my process can have more than 100
threads) or too many pthread_mutex'es? As far as I know the
pthread_mutexes use Mach ports.
Any suggestions?
Jaroslav Snajdr
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden