Apache - Increasing the HARD_SERVER_LIMIT

Stealth

Senior member
Oct 25, 2000
782
0
0
I am trying to increase the number of users apache can handle at one time by bumping up the value of the HARD_SERVER_LIMIT. I am currently using Apache that came with RedHat 7.3 straight from the distro CD. I did patch it up once running up2date. My question is how can I increase the HARD_SERVER_LIMIT value? I know I need to recompile Apache, but I'm not sure about how to do this. I know I need to recompile in PHP as well since my server is running php scripts. Do I need to download the Apache source from apache.org, then modify a file and recompile? Or can I do all this with what I already have on my RedHat 7.3 box?
 

N11

Senior member
Mar 5, 2002
309
0
0
There is an entry in httpd.conf for this called MaxClients (apache 1.3.x/2.x). Determines the maximum number of connections apache can handle at one time.

Modify this number and restart apache.

You don't need to recompile apache or php for such an increase.
 

Stealth

Senior member
Oct 25, 2000
782
0
0
I tried that before, and I got the following error:

Starting httpd: WARNING: MaxClients of 750 exceeds compile time limit of 256 servers, lowering MaxClients to 256. To increase, please see the HARD_SERVER_LIMIT define in src/include/httpd.h.

So it looks like I do need to change the value of HARD_SERVER_LIMIT.


>> My question is how can I increase the HARD_SERVER_LIMIT value? I know I need to recompile Apache, but I'm not sure about how to do this. I know I need to recompile in PHP as well since my server is running php scripts. Do I need to download the Apache source from apache.org, then modify a file and recompile? Or can I do all this with what I already have on my RedHat 7.3 box?
 

Stealth

Senior member
Oct 25, 2000
782
0
0
Regardless, I just want to have more than the current limit of 256. I'm trying to avoid having to install from rpm, but it doesn't look like I can. I'm not sure how to compile apache with php. I'm not sure what else I need to compile in. The default RedHat apache installation with php and mysql seems to be working fine, so I'd like to have it close to it as possible. Anyone here with experience with this care to chime in? Any good references or tutorials out there?
 

N11

Senior member
Mar 5, 2002
309
0
0
You would need to compile apache, and then compile php and reference the php module in your apache configuration file. Depending on what you require out of php (imap or mysql support, etc.) will determine how you compile it.

I'm uncertain as to your need for more than 256 concurrent connections. The servers I deal with that are constantly pushing 100-150 simultaneous connections and doing about 500GB of transfer per month will typically have a config set limit of 250. In certain instances will it be taken to 300 or in one instance 400 (these are shared environments with hundreds of websites). Unless you are in a similar situation the default allowance of 150 is more than enough.
 

Stealth

Senior member
Oct 25, 2000
782
0
0
N11, since you seem to know much about this topic, I figure I'll direct this question to you. Say if I set the limit to 150. How will I know in the future that I will need to bump this figure up? As an admin, what tools can I use to tell when this figure needs to be bumped up?

Btw, my current setup includes 1 load balancer, 4 frontend servers, and a database server. I'm going to be running a forums-based site, so I'd like to handle alot of concurrent connections. This is my first project of this scale, so I'm using this as a good learning experience.
 

teknodude

Member
Apr 11, 2002
186
0
0
Originally posted by: Stealth
I tried that before, and I got the following error:

Starting httpd: WARNING: MaxClients of 750 exceeds compile time limit of 256 servers, lowering MaxClients to 256. To increase, please see the HARD_SERVER_LIMIT define in src/include/httpd.h.

So it looks like I do need to change the value of HARD_SERVER_LIMIT.


>> My question is how can I increase the HARD_SERVER_LIMIT value? I know I need to recompile Apache, but I'm not sure about how to do this. I know I need to recompile in PHP as well since my server is running php scripts. Do I need to download the Apache source from apache.org, then modify a file and recompile? Or can I do all this with what I already have on my RedHat 7.3 box?

No offence intended Stealth, but if you're going to be getting this amount of traffic to your webserver (esp as it's exposed to the net and not just internal) I'm a little concerned that you don't know how to compile Apache with PHP etc. Or have I missed the point? If I'm on the wrong path plz correct me!

teknodude
 

Stealth

Senior member
Oct 25, 2000
782
0
0
No offense taken. As I stated, this is a project that I'm taken on by myself, and I'm basically taking it on with the objective of learning different aspects of Linux. I'm a recent college graduate and I'm relatively new to Linux. I'm not a full-time admin or webmaster (in fact, I'm a software engineer who develops M$ applications), so I'm basically doing this in my spare time. So as you can see, I have alot to learn! But I figure I'd rather learn hands on rather than spending $$$ on a course that's taught straight out from a book...though it may be helpful in times like these when I have questions!

Anyways, back to the subject. Since I need php and mysql, I'll have to compile in those two when recompiling apache. Are there any other things I need to be aware of? Do I need anything else that is 'standard'?

Thanks.

Originally posted by: teknodude
Originally posted by: Stealth
I tried that before, and I got the following error:

Starting httpd: WARNING: MaxClients of 750 exceeds compile time limit of 256 servers, lowering MaxClients to 256. To increase, please see the HARD_SERVER_LIMIT define in src/include/httpd.h.

So it looks like I do need to change the value of HARD_SERVER_LIMIT.


>> My question is how can I increase the HARD_SERVER_LIMIT value? I know I need to recompile Apache, but I'm not sure about how to do this. I know I need to recompile in PHP as well since my server is running php scripts. Do I need to download the Apache source from apache.org, then modify a file and recompile? Or can I do all this with what I already have on my RedHat 7.3 box?

No offence intended Stealth, but if you're going to be getting this amount of traffic to your webserver (esp as it's exposed to the net and not just internal) I'm a little concerned that you don't know how to compile Apache with PHP etc. Or have I missed the point? If I'm on the wrong path plz correct me!

teknodude

 

N11

Senior member
Mar 5, 2002
309
0
0
Originally posted by: Stealth
N11, since you seem to know much about this topic, I figure I'll direct this question to you. Say if I set the limit to 150. How will I know in the future that I will need to bump this figure up? As an admin, what tools can I use to tell when this figure needs to be bumped up?

Btw, my current setup includes 1 load balancer, 4 frontend servers, and a database server. I'm going to be running a forums-based site, so I'd like to handle alot of concurrent connections. This is my first project of this scale, so I'm using this as a good learning experience.

Common signs are if anyone ever experiences page timeouts where apache is unable to load the page in time while it is fully functional. We use more sophisticated monitoring mechanisms to give us reports as to concurrent connection statistics on a per server basis, allowing us to make the call before such issues arise.

If these are quick connections (IE a fast database driven forum) then you should be fine with 150-200.
 

N11

Senior member
Mar 5, 2002
309
0
0
Anyways, back to the subject. Since I need php and mysql, I'll have to compile in those two when recompiling apache. Are there any other things I need to be aware of? Do I need anything else that is 'standard'?

I'd entirely recommend, given your comfort level, to stick with a linux distro and that distros packaging methods. Red Hat's httpd and php packages will provide all of the modules and configured support that you will ever need.

It also makes upgrading a particular item much quicker and cleaner when the time comes.

With red hat you'd need --

httpd
php
php-mysql
mysql-server
mysql

And you can checkout some of the other php packages they have, for additional support you may need (example: php-imap).
 

Buddha Bart

Diamond Member
Oct 11, 1999
3,064
0
0
four webservers, each with 250 apache processes? Thats one thousand concurrent connections. I bet your database server falls down long before you push those 1000.

bart
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |