Apache Maxlicents problem Urgent!!

Support for webhosts that use CentOS
Post Reply
dbembibre
Posts: 8
Joined: 2007/03/12 10:16:44
Location: Spain (Madrid)
Contact:

Apache Maxlicents problem Urgent!!

Post by dbembibre » 2007/03/15 10:11:07

I has my los full of that apache has raise the maxclients, but i cant get more that 256 clients to work.

I try with the following httpd rpm's
2.0.52-28.ent.centos4
2.0.59-1.el4s1.5.el4.centos


this is my configure section, i use prefork mpm

[code]
<IfModule prefork.c>
StartServers 10
MinSpareServers 10
MaxSpareServers 15
MaxRequestsPerChild 1000
MaxClients 320
ServerLimit 320
</IfModule>
[/code]

[code]
[root@srv01 apache]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: WARNING: MaxClients of 320 exceeds ServerLimit value of 256 servers,
lowering MaxClients to 256. To increase, please see the ServerLimit
directive.
[ OK ]
[/code]

I cant compile httpd by hand because i think that is break plesk 8.1
i think that the hardlimit is in code, any solution alternative rpm ??? :-?

foxb
Posts: 1921
Joined: 2006/04/20 19:03:33
Location: Montreal/QC

Apache Maxlicents problem Urgent!!

Post by foxb » 2007/03/15 13:06:34

I cannot confirm this...

When changing the values in httpd.conf they are accepted???

dbembibre
Posts: 8
Joined: 2007/03/12 10:16:44
Location: Spain (Madrid)
Contact:

Re: Apache Maxlicents problem Urgent!!

Post by dbembibre » 2007/03/15 14:09:46

[quote]
foxb wrote:
I cannot confirm this...

When changing the values in httpd.conf they are accepted???[/quote]

If the value is between 256 and 0, then yes.

I dont know when who contact to answer this, i remember well thath the in version 1.3.x you need
to edit /src/include/httpd.h and change HARD_SERVER_LIMIT beacause that is hardcoded to 256 clients, but if i dont remember
bad in apache2 only need change MaxClients

dbembibre
Posts: 8
Joined: 2007/03/12 10:16:44
Location: Spain (Madrid)
Contact:

Re: Apache Maxlicents problem Urgent!!

Post by dbembibre » 2007/03/15 14:17:34

I found the solution, Apache is incredible stupid.

The directive ServerLimit needed write before MaxClients.

Sample of my config

[code]
<IfModule prefork.c>
StartServers 10
MinSpareServers 10
MaxSpareServers 15
ServerLimit 320
MaxClients 320
MaxRequestsPerChild 1000
#ServerLimit 320
</IfModule>
[/code]

Restart command :-D :-D :-D

[code]
[root@srv01 daniel]# /etc/init.d/httpd reload
Reloading httpd: [ OK ]
[root@srv01 daniel]#
[/code]

archy
Posts: 3
Joined: 2007/03/24 18:57:10
Contact:

Re: Apache Maxlicents problem Urgent!!

Post by archy » 2007/03/24 19:10:05

your config

StartServers 10
MinSpareServers 10
MaxSpareServers 15
MaxRequestsPerChild 1000
MaxClients 320
ServerLimit 320


my config will be


StartServers 10
MinSpareServers 10
MaxSpareServers 15
MaxRequestsPerChild 1000
ServerLimit 320
MaxClients 320


you need to set [color=330000]ServerLimit before MaxClients[/color]
hope this help

Post Reply