3

Details

Here is what I see in the logs file

2014-09-08T10:22:43.143+0000 [initandlisten] ERROR: Out of file descriptors. Waiting one second before trying to accept more connections.
2014-09-08T10:22:43.360+0000 [conn9206] Assertion: 12520:new file allocation failure

System Resource limit details -

ulimit -a

max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024

System Details

Ubuntu 12.04 LTS

MongoDB Version

2.6.1

Also,

lsof -p mongopid

2028 open file descriptors

Can anyone help ..? I am getting this repeatedly on my production server.. Looked on google.. Found this mongo issue closed -

https://jira.mongodb.org/browse/SERVER-6734

2

1 Answer 1

4

Looks like your open files are too little. You must add some lines on the following configuration files (and change mongouser for the username that runs MongoDB):

/etc/security/limits.conf

mongouser soft nofile 32768
mongouser hard nofile 65535

/etc/sysctl.conf

fs.file-max = 500000

/etc/pam.d/login

session required pam_limits.so

/home/mongouser/.bashrc

ulimit -n 63535

After rebooting the server the new limits will be in place.

3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .