You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mike <mi...@ironmikie.nl> on 2003/05/07 13:17:38 UTC

[users@httpd] Too many open files: couldn't spawn child process

Hi,                                                                                                                                 
                                                                                                                                    
I constantly get Too many open files: couldn't spawn child process: in my apache error_logs. It's a pretty heavily used webserver. A
re there any kind of workarrounds for it?                                                                                           
                                                                                                                                    
The OS is Suse :(                                                                                                                   
                                                                                                                                    
Here is some output of some commands:                                                                                               
                                                                                                                                    
cat /proc/sys/fs/file-nr                                                                                                            
2059    327     65535                                                                                                               
                                                                                                                                    
cat /proc/sys/fs/file-max                                                                                                           
65535                                                                                                                               
                                                                                                                                    
ulimit -a                                                                                                                           
core file size (blocks)     0                                                                                                       
data seg size (kbytes)      unlimited                                                                                               
file size (blocks)          unlimited                                                                                               
max locked memory (kbytes)  unlimited                                                                                               
max memory size (kbytes)    unlimited                                                                                               
open files                  1024                                                                                                    
pipe size (512 bytes)       8                                                                                                       
stack size (kbytes)         unlimited                                                                                               
cpu time (seconds)          unlimited                                                                                               
max user processes          4086                                                                                                    
virtual memory (kbytes)     unlimited                                                                                               
                                                                                                                                    
sysctl -a                                                                                                                           
fs.inode-state = 73166  41053   0       0       0       0       0                                                                   
fs.inode-nr = 73166     41053                                                                                                       
                                                                                                                                    
Some output of debugfs:                                                                                                             
Block size = 4096, fragment size = 4096                                                                                             
Inode size = 128                                                                                                                    
2240224 inodes, 1974009 free                                                                                                        
4480096 blocks, 311222 free, 224004 reserved, first block = 0                                                                       
32768 blocks per group                                                                                                              
32768 fragments per group                                                                                                           
16352 inodes per group                                                                                                              
137 groups (2 descriptors blocks)                                                                                                   
                                                                                                                                    
If anyone has some good ideas, please let me know, because it's giving me bad headaches.                                            
                                                                                                                                    
thanks in advance,                                                                                                                  
                                                                                                                                    
mike 

---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many open files: couldn't spawn child process

Posted by ge...@ameritech.net.
You don't say which UNIX you're using, but changing the number of 
possibly open files is generally a kernel parameter, i.e., you're going 
to have to tune the kernel.

ken

At 22:22 (UTC+0200) on Tue, 3 Jun 2003 Peter Poeml said:

= On Wed, May 07, 2003 at 01:17:38PM +0200, Mike wrote:
= > I constantly get Too many open files: couldn't spawn child process: in my apache error_logs. It's a pretty heavily used webserver. A
= 
= > ulimit -a                                          
= [...]
= > open files                  1024                   
= 
= You called ulimit -a as which user? How does ulimit -Hn look like?
= Can you raise ulimit before starting apache and see if it helps?0
= 
= Peter
= 
= 


---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many open files: couldn't spawn child process

Posted by Peter Poeml <po...@suse.de>.
On Wed, May 07, 2003 at 01:17:38PM +0200, Mike wrote:
> I constantly get Too many open files: couldn't spawn child process: in my apache error_logs. It's a pretty heavily used webserver. A

> ulimit -a                                          
[...]
> open files                  1024                   

You called ulimit -a as which user? How does ulimit -Hn look like?
Can you raise ulimit before starting apache and see if it helps?0

Peter

-- 
Thought is limitation. Free your mind.

Re: [users@httpd] Too many open files: couldn't spawn child process

Posted by Mike <mi...@ironmikie.nl>.
Dear Nikunj,

The problem is not the file-max on the system, because the value is already 65535. The problem i quess has something to do width apache values. But i don't which one exactly and how to change these easy.

Greetz,

Mike

On Wed, May 07, 2003 at 05:21:41PM +0530, Nikunj Virani wrote:
> It seems that you have too many open files on your server. You can check out
> "/usr/sbin/lsof" which will show the list of open files. To check how much
> open files you can have run:
> 
> cat /proc/sys/fs/file-max
> 
> To increase this number to say 12000 use:
> 
> echo 12000 > /proc/sys/fs/file-max*
> 
> It worked for me last time i got the problem. Hope it helps you too.
> Cheers!
> Nikunj Virani
> 
> *Make sure you back up your file before you change it.
> 
> ----- Original Message -----
> From: "Mike" <mi...@ironmikie.nl>
> To: <us...@httpd.apache.org>
> Sent: Wednesday, May 07, 2003 4:47 PM
> Subject: [users@httpd] Too many open files: couldn't spawn child process
> 
> 
> > Hi,
> >
> > I constantly get Too many open files: couldn't spawn child process: in my
> apache error_logs. It's a pretty heavily used webserver. A
> > re there any kind of workarrounds for it?
> >
> > The OS is Suse :(
> >
> > Here is some output of some commands:
> >
> > cat /proc/sys/fs/file-nr
> > 2059    327     65535
> >
> > cat /proc/sys/fs/file-max
> > 65535
> >
> > ulimit -a
> > core file size (blocks)     0
> > data seg size (kbytes)      unlimited
> > file size (blocks)          unlimited
> > max locked memory (kbytes)  unlimited
> > max memory size (kbytes)    unlimited
> > open files                  1024
> > pipe size (512 bytes)       8
> > stack size (kbytes)         unlimited
> > cpu time (seconds)          unlimited
> > max user processes          4086
> > virtual memory (kbytes)     unlimited
> >
> > sysctl -a
> > fs.inode-state = 73166  41053   0       0       0       0       0
> > fs.inode-nr = 73166     41053
> >
> > Some output of debugfs:
> > Block size = 4096, fragment size = 4096
> > Inode size = 128
> > 2240224 inodes, 1974009 free
> > 4480096 blocks, 311222 free, 224004 reserved, first block = 0
> > 32768 blocks per group
> > 32768 fragments per group
> > 16352 inodes per group
> > 137 groups (2 descriptors blocks)
> >
> > If anyone has some good ideas, please let me know, because it's giving me
> bad headaches.
> >
> > thanks in advance,
> >
> > mike
> >
> > ---------------------------------------------------------------------
> > 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: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> 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: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many open files: couldn't spawn child process

Posted by Nikunj Virani <ni...@netsurf.co.in>.
It seems that you have too many open files on your server. You can check out
"/usr/sbin/lsof" which will show the list of open files. To check how much
open files you can have run:

cat /proc/sys/fs/file-max

To increase this number to say 12000 use:

echo 12000 > /proc/sys/fs/file-max*

It worked for me last time i got the problem. Hope it helps you too.
Cheers!
Nikunj Virani

*Make sure you back up your file before you change it.

----- Original Message -----
From: "Mike" <mi...@ironmikie.nl>
To: <us...@httpd.apache.org>
Sent: Wednesday, May 07, 2003 4:47 PM
Subject: [users@httpd] Too many open files: couldn't spawn child process


> Hi,
>
> I constantly get Too many open files: couldn't spawn child process: in my
apache error_logs. It's a pretty heavily used webserver. A
> re there any kind of workarrounds for it?
>
> The OS is Suse :(
>
> Here is some output of some commands:
>
> cat /proc/sys/fs/file-nr
> 2059    327     65535
>
> cat /proc/sys/fs/file-max
> 65535
>
> ulimit -a
> core file size (blocks)     0
> data seg size (kbytes)      unlimited
> file size (blocks)          unlimited
> max locked memory (kbytes)  unlimited
> max memory size (kbytes)    unlimited
> open files                  1024
> pipe size (512 bytes)       8
> stack size (kbytes)         unlimited
> cpu time (seconds)          unlimited
> max user processes          4086
> virtual memory (kbytes)     unlimited
>
> sysctl -a
> fs.inode-state = 73166  41053   0       0       0       0       0
> fs.inode-nr = 73166     41053
>
> Some output of debugfs:
> Block size = 4096, fragment size = 4096
> Inode size = 128
> 2240224 inodes, 1974009 free
> 4480096 blocks, 311222 free, 224004 reserved, first block = 0
> 32768 blocks per group
> 32768 fragments per group
> 16352 inodes per group
> 137 groups (2 descriptors blocks)
>
> If anyone has some good ideas, please let me know, because it's giving me
bad headaches.
>
> thanks in advance,
>
> mike
>
> ---------------------------------------------------------------------
> 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: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org