[rhn-users] ulimit modification

Geoff Sweet Geoff.Sweet at wildtangent.com
Tue Nov 1 20:22:38 UTC 2005


That's perfect, thanks!

-Geoff

-----Original Message-----
From: rhn-users-bounces at redhat.com [mailto:rhn-users-bounces at redhat.com]
On Behalf Of Grant Street
Sent: Monday, October 31, 2005 10:33 PM
To: Red Hat Network Users List
Subject: Re: [rhn-users] ulimit modification

Hello Geoff

> 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?

Try adding a line in the /etc/security/limits.conf (as well as the 
sysctl.conf entry), this allows you to set the limits on a per user, 
group etc. eg

<username>	hard	nofile	16384

Grant

_______________________________________________
rhn-users mailing list
rhn-users at redhat.com
https://www.redhat.com/mailman/listinfo/rhn-users




More information about the rhn-users mailing list