[rhn-users] ulimit modification

Geoff Sweet Geoff.Sweet at wildtangent.com
Mon Oct 31 18:08:27 UTC 2005


We have an application that we host on Red Hat ES4.  This application
brokers network connections from a host of clients.  Recently with some
increased activity we noted that the application dies because it can't
make any more connections.  When the application is run as root this
isn't a problem because the startup script specifies:
 
ulimit -n 16384
 
However in order to run this app as a non-privileged user, I still need
to alter the ulimit.  I believe I found the solution by adding:
 
#Increase number of file descriptors.  
fs.file-max=16384

 
To the end of /etc/sysctl.conf.  However testing shows that the app
still stops accepting connections at about 1000 when run as a
non-privileged user.  One of my suspicions is that it has to do with the
way the app is started.  The app is started out of /etc/init.d, but
instead of being started as root, then the app dropping privs, it is
started with the command:
 
su  <username> -c /full/path/to/app
 
What am I missing to alter the ulimit for the user that I am trying to
run this app under?
 
-Geoff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhn-users/attachments/20051031/cdcf9441/attachment.htm>


More information about the rhn-users mailing list