Subject: Re: [vserver] default ulimits
From: "Roderick A. Anderson" <raanders@cyber-office.net>
Date: Wed, 23 Sep 2009 07:27:58 -0700

Corin Langosch wrote:
> On 23.09.2009 11:49, Herbert Poetzl wrote:
>> let's remove the /etc/vservers/vs15780/ulimits/* for
>> a test, restart the guest, ssh into it and do:
>>
>>  ulimit -Ha
>>  ulimit -Sa
>>
>> this should give you huge numbers for the hard limits
>> and reasonable values for the soft limits, note that
>> once the hard limit is lowered, you cannot raise it
>> inside a guest, e.g.:
>>
>> lenny:~# ulimit -H -n 8192
>> lenny:~# ulimit -H -n 16384
>> -bash: ulimit: open files: cannot modify limit: Operation not permitted
>>   
> You are right, it seems to be a problem of my shell or ssh daemon
> setting lower limits. When I enter the vserver from the host using
> "vserver ... enter", the limits are very high and I can change them to
> ex. 8192. But when I connect to the guest using ssh, the limit is 1024
> and so I can't set it to 8192.
> 
> I don't know where these limits come from: the shell, the ssh daemon...
> My work around for now is simply to start the programs with the higher
> limits from the boot scripts (/etc/init.d) only. To restart them, I have
> to restart the vserver or enter the vserver from the host and do the
> restart.

Look at /etc/security/limits.conf in the guest.  This seems to be the 
place for Debian-based and Redhat-base systems.


\\||/
Rod
-- 

> 
> Corin
> 
>