httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From palewire <ben.we...@gmail.com>
Subject RE: [users@httpd] What is the best way to handle "too many open files" errors?
Date Fri, 22 May 2009 00:00:13 GMT

Mick, 

Thanks for your expertise and time.

Here are my settings in httpd.conf, which I've tweaked in the last couple
days per some advice from my host.

<IfModule prefork.c>
StartServers       2
MinSpareServers    2
MaxSpareServers    5
ServerLimit      200
MaxClients       200
MaxRequestsPerChild  4000
</IfModule>

And here's the ulimit:

# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 137215
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

How would I do the sort of math you propose?

Thanks,

Ben.


Mick Sheppard wrote:
> 
> Hi,
> 
> Just to throw a slight spanner in the works here. My understanding of
> 'open files' is open file descriptors. As far as a file descriptor is
> concerned there is no real difference between a physical file on disk
> and a socket (network connection). So eliminating physical files, whilst
> it might get you a little more headroom, is unlikely to solve the
> problem.
> 
> I would look at the Apache configuration to see how many connections
> your server is configured to handle and compare that to the max files
> value from ulimit. I suspect that this is your issue.
> 
> Remember that as you add connectivity to databases that this will
> increase the number of sockets, and therefore open files, used for each
> page served.
> 
> Mick
> 
> -----Original Message-----
> From: palewire [mailto:ben.welsh@gmail.com] 
> Sent: 20 May 2009 23:55
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] What is the best way to handle "too many open
> files" errors?
> 
> 
> Sean --
> 
> Thanks for the lengthy and thoughtful response. 
> 
> What I've found most successful so far is hunting through the lsof |
> grep
> http and finding ways to eliminate unnecessary files. And I'm also
> exploring
> an expansion of my production resources to include a second tier machine
> that houses the database. 
> 
> If either of these ideas are stupid -- or there's something more
> efficient
> -- I'd really appreciate the pointers. 
> 
> Thank you.
> 
> Ben.
> -- 
> View this message in context:
> http://www.nabble.com/-users%40httpd--What-is-the-best-way-to-handle-%22
> too-many-open-files%22-errors--tp23629492p23644950.html
> Sent from the Apache HTTP Server - Users mailing list archive at
> Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> This is an email from the CPP Group Plc, Holgate Park, York, YO26 4GA;
> telephone +44 (0)1904 544500.
> This message may contain information that is confidential. If you are not
> the intended recipient,
> you may not peruse, use, disseminate, distribute or copy this message. If
> you have received this
> message in error, please notify the sender immediately by email, facsimile
> or telephone and either
> return or destroy the original message.
> 
> The CPP Group Plc accepts no responsibility for any changes made to this
> message after it has been
> sent by the original author.  This email has been scanned for all viruses
> by the MessageLabs 
> Email Security System.
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-users%40httpd--What-is-the-best-way-to-handle-%22too-many-open-files%22-errors--tp23629492p23662369.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


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


Mime
View raw message