DenRaf's Blog

  • Contact

Contact
View Raf Nijskens's profile on LinkedIn
OpenSource
Linux
Powered by Drupal, an open source content management system
Get Firefox
Fosdem
Visit Inuits Technical home

Locations of visitors to this page

Tags in TagCloud

5 6 ADP1 Android apache automaticmenu caching cardreader cats Centos closed source cron Debian dell Dell R200 deploy Dream driver drupal drupalcron eclair Fosdem funambol mysql node_page O2Micro old openfire OpenID OSD otrs password trigger password_trigger plutado Ports presentation recover response header rpm script svn sync syncml tagadelic taxonomy terminal logging theme ubuntu update upgrade user filter user_import virt-manager wordpress wordpress 2.3 wp2drupal xmlsitemap zabbix zimbra Zimbra LDAP
more tags
Home » Blogs » DenRaf's blog

Too many open files

Submitted by DenRaf on Thu, 02/26/2009 - 19:02
  • [View]

Has anyone a clue on this one ?

sudo cat /proc/sys/fs/file-max
1048576

sudo cat /etc/security/limits.conf
* soft nofile 1048576
* hard nofile 1048576

sudo cat /etc/sysctl.conf
fs.file-max=1048576

ulimit -n
1048576

But yet when my service starts at boot:

sudo cat /proc/pid/limits | grep files
Max open files 1024 1024 files

Whenever I restart my service everything is ok:
sudo cat /proc/pid/limits | grep files
Max open files 1048576 1048576 files

This is running on a Debian Etch with kernel 2.6.28

  • DenRaf's blog
  • Add new comment
Tags:
  • SysAdmin
  • Debian

4 reponses to "Too many open files"

1. is it not part of your profile?

Submitted by ghosty (not verified) on Tue, 03/03/2009 - 00:40.

in rhel 5 i noticed they also have an entry like that in /etc/profile or ~/.profile or the likes (should have a look at work in my documentation which exactly overrides it ...) to fix this i just commented that line and problem solved!
Not sure if it's also the case in debian, but anyway tweaking the amount of open files to such a high amount suggests you are doing strange stuff (it is not recommended!)

  • reply

2. No profile files. I know it's

Submitted by DenRaf on Tue, 03/03/2009 - 08:46.

No profile files.

I know it's a high value, but we are doing strange stuff and it was requested by the customer.

I have temporarily fixed it by calling ulimit in the init script and that works fine.

  • reply

3. Second attempt

Submitted by M. Gy. (not verified) on Thu, 03/26/2009 - 16:47.

O.K., I've read the thread again and seen that half of my previous reply is unnecessary. However, that /etc/initscript may be the key.

  • reply

4. Two types of max. number of file descriptors

Submitted by M. Gy. (not verified) on Thu, 03/26/2009 - 16:28.

Hi,

To be able to have 100 000 files open systemwide is not so strange...

There are two types of limit of the max. number of file descriptors: system-wide and login shell-wide. The system-wide can be checked this way:
cat /proc/sys/fs/file-max
The default value is 205290 on many distros.

The other limit is per user and per login shell and is set in /etc/security/limits.conf in CentOS and openSUSE. The default value for that is 1024. This means when you log in and run 'ulimit -n' from your shell it shows 1024. There is a way to set it higher:

/etc/iniscript:
ulimit -n 4096
eval exec "$4"

/etc/security/limits.conf
* soft nofile 1024
* hard nofile 1024
root soft nofile 4096
root hard nofile 8192
user1 soft nofile 4096
user1 hard nofile 8192

Here is a reference:
http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp?topic...

and another one:
http://confluence.atlassian.com/display/CONF26/Fix+%27Too+many+open+file...

HTH

  • reply

Guided search

Click a term to initiate a search.

Categories

  • drupal (26)
  • Linux (6)
  • SysAdmin (6)
  • Uncategorized (5)
  • Linux-tools (3)

Date authored

  • 2010 (5)
  • 2009 (10)
  • 2008 (27)
  • 2007 (11)

TagCloud

  • drupal (26)
  • Ports (7)
  • cron (6)
  • drupalcron (6)
  • 6 (3)
  • OSD (3)
  • zimbra (3)
  • cats (2)
  • Fosdem (2)
  • funambol (2)
  • more...

Recent blog posts

  • OSD2010: Day 2
  • OSD2010: Day 1
  • OSD2010: Pre notes
  • Howto: Android 2.1 on G1/ADP1/Dream
  • Updated look
  • Zimbra monitoring with zabbix
  • New module: Node Page Template
  • AutomaticMenu module for drupal 6
  • Drupal synchronisation
  • Imagefield_gallery module for drupal 6
more

Recent comments

  • I've installed it on my
    1 week 5 days ago
  • I am also having the same
    3 weeks 4 days ago
  • No Video
    4 weeks 1 day ago
  • Good, just finished the
    5 weeks 2 days ago
  • Screenshot Item Trigger
    5 weeks 4 days ago
  • You don't need 2 because
    10 weeks 3 days ago
  • Oracle plugin
    10 weeks 5 days ago
  • private serverlar
    10 weeks 5 days ago
  • Thanks much for providing
    11 weeks 12 hours ago
  • Templates give you a general
    11 weeks 2 days ago

Syndicate

Syndicate content
I love Smashing Magazine!
Fervens Drupal theme by Leow Kah Thong. Designed by Design Disease and brought to you by Smashing Magazine.