SS3 Too many open files in system (Debian server)

59 views
Skip to first unread message

micschk

unread,
May 10, 2013, 11:26:31 AM5/10/13
to silverst...@googlegroups.com
Has anyone else run into this? I have a  Silverstripe 3 site with medium traffic (about 600 visitors/day), which seems to cause "Too many open files in system" on the server (Debian).

Log entries show up like: "Cannot open shared object file: Error 23" and "Too many open files in system"

A reboot resolves the issue. The site doesn't use caching and "ulimit -H -n" shows the default 1024, which I gues should be fine(?).

Steven Mohr

unread,
May 11, 2013, 8:26:28 PM5/11/13
to silverst...@googlegroups.com
We had a similar problem caused indirectly by subversion rather than Silverstripe, but at the root of it was Apache having too many files open.  Our server was running OSX so the commands for setting the open files limits were a bit different and the default was ridiculously low: 256.

The problem may either be that Apache is not able to properly close threads which are opening files, or perhaps you actually do need that many files open so you might want to try increasing the number.
Just to make it slightly more confusing, the number you see when you show the limit may not be the same limit that is being applied to Apache either.  You may need to research how to place the value into the proper config file which is loaded for the account that apache uses when it starts (or a global config), which means a reboot each time you want to change it to test.

If it is Apache causing the trouble and if it is a bug someplace instead of an actual need for more files, you may be able to simply restart Apache instead of the machine to make the problem temporarily go away.  However, this did not work for us because subversion would simply re-open all of its files as soon as apache was restarted.

You should also be able to use ps to list open files.
Sorry I can't give you more precise instructions, its been awhile since I debugged this issue.

Tim Klein

unread,
May 12, 2013, 1:31:09 AM5/12/13
to silverst...@googlegroups.com
Odd!
check that all fopen handles are properly closed (fclose) and swap the default cache backend to apc which should move the SS cache file to the ram...
Reply all
Reply to author
Forward
0 new messages