<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2722" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial><FONT size=2><SPAN class=202333117-31102005>We have an
application that we host on Red Hat ES</SPAN>4<SPAN
class=202333117-31102005>. 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:</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=202333117-31102005></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=202333117-31102005>ulimit -n
16384</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=202333117-31102005></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=202333117-31102005>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:</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=202333117-31102005></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=202333117-31102005>#Increase
number of file descriptors.
<BR>fs.file-max=16384<BR></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=202333117-31102005></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=202333117-31102005>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:</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=202333117-31102005></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=202333117-31102005>su
<username> -c /full/path/to/app</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=202333117-31102005></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=202333117-31102005>What am I
missing to alter the ulimit for the user that I am trying to run this app
under?</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=202333117-31102005></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=202333117-31102005>-Geoff</DIV></SPAN></FONT></FONT></BODY></HTML>