[Yanel-dev] too many open files problem on VMWare Ubuntu

Michael Wechner michael.wechner at wyona.com
Sat Jul 23 11:05:23 CEST 2011


On 4/1/11 1:06 PM, Michael Wechner wrote:
> Hi
>
> We are experiencing a "too many open files" problem on VMWare Ubuntu 
> when running the lucene re-indexing, whereas this is done on a mac and 
> if running the lucene re-indexing on Mac OS X everything is fine.

It's odd that on Mac OS X it's fine although according to "ulimit -a" 
one has

open files                      (-n) 256

whereas on "our" Linux we have

open files                      (-n) 1024

Well, one might argue that on the Linux system there might be other 
processes "eating" these, but
I couldn't see anything which would be much different than Mac OS X
>
> I could image that the VMWare Ubuntu is slow on the IO (because of the 
> various layers) and hence a "queue" of open files is established which 
> are not being closed fast enough and hence when the limit of Ubuntu is 
> reached it will "crash".
>
> I guess we could increase this limit
>
> #su root
> #ulmit -n 1000000

An alternative might be to increase it for  a particular user:

- sudo su root
- vi /etc/security/limits.conf
- Add the following lines (whereas 'wyona' should be replaced by the 
users you are using):
wyona           soft    nofile          10240
wyona           hard    nofile          20480
- exit
- start a new shell for the particular user (e.g. 'wyona')
- ulimit -a (should tell you that you now: open 
files                      (-n) 10240

This worked for us :-) (but still it would be nice if we wouldn't have 
to do this in the first place)

HTH

Michael

>
> but I don't think that's really solving the problem.
>
> Anyway it's good to keep this in mind when using virtualization.
>
> Cheers
>
> Michael
>
>
>



More information about the Yanel-development mailing list