LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-02-2005, 12:55 AM   #1
Erhnam
Member
 
Registered: Jan 2005
Posts: 54

Rep: Reputation: 15
Apache performance server reached MaxClients setting


I have a plesk (7.5.2 box) running with Redhat 9. This machine (Pentium 4 1024 mhz) was running fine for quite a long time. This week one of my sites became very populair and this gives me some troubles. The apache server stops to work and I need to restart it within every 10 minutes. Then apache is up and after 10 minutes its down again. The server log said this:

[error] server reached MaxClients setting, consider raising the MaxClients setting

So I changed the MaxClients from 100 to 256.
This will increase the dying time from 10 minutes till 20 minutes but does not solve the problem. When I check the apache status I see this:

/etc/init.d/httpd status
httpd (pid 5073 5072 5071 5070 5069 5068 5067 5065 5064 5063 5062 5061 5060 5059 5058 5057 5056 5055 5054 5053 5052 5051 5050 5049 5048 5034 5033 5032 5031 5030 5029 5028 5027 5026 5025 5024 5023 5022 5021 5019 5018 5010 5009 5008 5007 5006 5004 5003 5002 4998 4997 4995 4994 4991 4990 4988 4953 4952 4951 4950 4949 4947 4946 4945 4944 4943 4942 4941 4940 4939 4938 4937 4936 4935 4934 4933 4932 4930 4929 4928 4927 4926 4925 4924 4923 4922 4921 etc etc etc


This is my current httpd.conf:

KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 256
MaxRequestsPerChild 1000
</IfModule>

<IfModule worker.c>
StartServers 2
MaxClients 256
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>


Please let me know how I can solve this problem!
 
Old 06-02-2005, 02:52 AM   #2
saneax
Member
 
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86

Rep: Reputation: 15
read this
http://httpd.apache.org/docs-2.0/mod/prefork.html
 
Old 06-24-2008, 07:29 PM   #3
spyxx7us
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Rep: Reputation: 0
I have The same problem:

I have The same problem:
My server is FILE server only (Xeon, RAM 2G, 200GB HDD, Apache/2.0.52), with many internet client DOWNLOAD files (not upload, have not Database).
The number of httpd process is incresed very quickly, and reached MaxClients quickly, each 3 minute, i count httpd process, as folowing:

2008-06-22 10:15:02-RESTART HTTPD service:
2008-06-22 10:18:02-COUNT=63
2008-06-22 10:21:01-COUNT=140
2008-06-22 10:24:02-COUNT=173
2008-06-22 10:27:02-COUNT=328
2008-06-22 10:30:02-COUNT=434
2008-06-22 10:33:01-COUNT=561
2008-06-22 10:36:02-COUNT=630
2008-06-22 10:39:01-COUNT=751
2008-06-22 10:42:01-COUNT=877
2008-06-22 10:45:01-COUNT=999
...
And this problem repeats and repeats...


My server installed Apache/2.0.52, with settings:
-----
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule prefork.c>
StartServers 16
MinSpareServers 3
MaxSpareServers 5
ServerLimit 1000
MaxClients 1000
MaxRequestsPerChild 1000
</IfModule>
------
I've change some parameter, ex, decrease MaxRequestsPerChild (2000-1000->100...), KeepAlive Off ->On... and other changes... But problem still happens!

Have you got experience in this problem?
Thanks very much!
 
Old 06-25-2008, 12:55 AM   #4
nolinuxnollife
Registered User
 
Registered: Jan 2005
Location: india
Distribution: RedHat and Madrake
Posts: 55
Blog Entries: 1

Rep: Reputation: 15
Before you try to troubleshoot the issue at apache level, I suggest you to go with another NIC of good make and make apache listen on both NICs for providing availability.I assume that this will solve the problem to 35-50% .

mahen
 
Old 06-26-2008, 11:56 PM   #5
spyxx7us
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Rep: Reputation: 0
Quote:
Originally Posted by nolinuxnollife View Post
Before you try to troubleshoot the issue at apache level, I suggest you to go with another NIC of good make and make apache listen on both NICs for providing availability.I assume that this will solve the problem to 35-50% .

mahen
Thanks!

And I wonder if this solution can resolve problem : ?

http://www.theadminzone.com/forums/s...ht=lightweight

Last edited by spyxx7us; 06-27-2008 at 12:24 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache MaxClients Issue SiLiCoN *BSD 6 12-08-2005 01:14 PM
Server can be reached, but it cannot see outside world.. noisy_cricket Linux - Networking 2 05-11-2005 05:36 PM
apache maxclients exceed abefroman Mandriva 0 04-23-2004 03:06 PM
problems setting up apache and vsftp server behind a router that serves as a server xone Linux - Security 1 04-08-2004 10:46 AM
Apache Download Server Performance Issues Matt@Ants Linux - General 1 08-04-2003 08:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration