Hi Sean,
thanks a lot for your detailed descripton. I will try it tomorrow and
let you now if this solved my problem.

Olli

> -----Ursprüngliche Nachricht-----
> Von: Sean Conner [mailto:[EMAIL PROTECTED] 
> Gesendet: Samstag, 30. Juli 2005 11:32
> An: users@httpd.apache.org
> Betreff: Re: AW: AW: AW: [EMAIL PROTECTED] Too many open files ...
> 
> 
> It was thus said that the Great Oliver Kirchel once stated:
> > 
> > Hi Sean,
> > I put it into /etc/init.d/apache2.
> > How can I control if the ulimit is now 2048.
> > If I do "ulimit -n" after restarting the apache it still shows 1024.
> 
>   Yes, that's expected, but I'm not sure if I can explain why 
> in less than a thousand words.
> 
>   You have a simple shell script that does:
> 
>       #!/bin/bash
>       ulimit -n 2048
>       /usr/local/apache2/bin/httpd &
>       exit 0
> 
>   It does a ulimit, followed by running Apache in the 
> background, then exits.  You're sitting at a Unix prompt:
> 
>       # 
> 
>   You check the current ulimit for open files:
> 
>       # ulimit -n
>       1024
>       #
> 
>   You then run your script:
> 
>       # myscript
>       #
> 
>   And check again:
> 
>       # ulimit -n
>       1024
>       #
> 
>   But here's what happens.  When you run any command (with a 
> few exceptions, like "ulimit"), the shell will create a new 
> process with which to run the command.  So let's say your 
> shell is process 100.  You type in "myscript", which creates 
> a new process, 101.  Process 101 (which is the script) will 
> then do a "ulimit -n 2048" *which affects only itself* (in 
> this case, process 101).  Process 101 then launches Apache, 
> which will create process 102, but that process, since it was 
> created from process 101 which has an open file limit of 
> 2048, it too will get an open file limit of 2048.  Since you 
> specified Apache to run in the background, process 101 
> resumes running after starting Apache, but in this case, all 
> it does is exit back to your shell, which is process 100.  
> Process 100 still has the original open file limit of 1024.
> 
>   I hope that explains it.
> 
>   -spc
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project. See 
> <URL:http://httpd.apache.org/userslist.html> for more info. 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>    "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to