Click to See Complete Forum and Search --> : Help with Apache
mfreund
12-03-2000, 04:29 AM
Hi all
I have a question about apache.....I have been using it for about a year now and am currently in the adult biz. A year ago I paid an admin to tweak apache to handle many more users and stuff do to the traffic involved in the adult web. I have since then been learning alot about linux but still get stuck here and there. What this admin did a year ago is turned up my max clients to 1024 and so on....I tried to do this and it says after I modify httpd.conf and restart it it says maxclients allowed 256. Well after reading on the web some stuff I realized that there is supposed to be a file in apache before you compile called httpd.h and things seem to be telling me to modify something called hard_server_limit. Is this all I have to do before I compile apache and is this the best thing to do to handle the adult traffic? I am a good user of apache but this is the first machine I have to config all myself and wanted to do it the same way as my other machine since it seems to work great. If anyone can give me info on how to do the above it would be greatly appreciated
Thanks
Matt
Sweede
12-03-2000, 02:05 PM
you would also have to change something in the kernel i believe to allow for that many processes.
im not totally sure what it is though.
klamath
12-03-2000, 04:22 PM
Well, you'd need to change apache_1.x.x/src/include/httpd.h , and change the line '#define HARD_SERVER_LIMIT 256' to whatever else you'd like. By reading the comments in the file, that appears to be what you're looking for.
Will this help? It might, it might not. High-performance web tuning is quite tricky, it's not as simple as just changing a couple params. What hardware is this running on? What net connection? Are you sure you really can serve 1024 simultaneous connections?
You should use a web benchmarking app (like 'ab', distributed with Apache) to test Apache's performance with different settings.
------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the Better Bulletin Board (http://bbb.sourceforge.net)
mfreund
12-03-2000, 07:06 PM
As far as the hard_server_limit in the httpd.h file i have made it that far......but once i change it I then go to httpd.conf and change the max clients setting to 1024 and restart and it give me the same error saying that the max is 256 and if I want to change it that I have to go to the the httpd.h file and change the hard_server_limit setting.....I have no idea http://www.linuxnewbie.org/ubb/smile.gif
As for the hardware it is a pentium 3 850 with 256 meg of ram.....that will be running on a T1 in about 10 days......as far as can it handle it I am not sure. The reason I am trying to do this is I have an existing server that I paid someone to tweak about a year or so ago and that part with the max clients is done.....The server seems to run great and it is only a pentium 450.
hmm have you recompiled apache after changing the .h file?
Saai
Sweede
12-03-2000, 07:16 PM
your T-1 and your server itself will run out of steam waaaaaaaaaaaaaaaaaaaaaaaay before apache hits its limits with the current MAX clients of 150.
have the minservers be around 5 and the max about 20, start about 10 servers. leave MAX CLIENTS at current MAX (256), and you'll be fine.
mfreund
12-03-2000, 10:30 PM
Thanks for all your help...I am just wondering why on my other server this kid put my max clients at 1024....what would be the benifit if any?
mfreund
12-03-2000, 10:36 PM
Oh yeah one more question.....I set up the server with 6.2 linux by redhat...and it put in a version of apache....I then downloaded another version of apache and compiled and installed it......it installed fine but the other version of apache is still there and so i tried to do a rpm -e remove of the older apache after i did a killall httpd and when i do the rpm erase command it comes back and says that it cannot remove it because php 3 depends on the webserver and I cannot figure out how to get rid of it....any ideas?......The new install works fine and I can start it and it runs ok but it is installed in a different location......should i just leave it like that and not worry about getting rid of the old one? I would really like to know though how to get rid of the old one
Thanks
klamath
12-04-2000, 12:35 AM
I am just wondering why on my other server this kid put my max clients at 1024....what would be the benifit if any?
My guess would be there wouldn't be a benefit (and certainly not with a P2-450). I would guess that this "kid" didn't know what he was doing. Of course, the only way to check for sure is to use a benchmarking app.
For your other problem, I'd suggest removing the Apache and PHP RPMs, and then re-installing both Apache and PHP from source. Using RPMs of important stuff like Apache is a very bad idea, IMHO.
------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the Better Bulletin Board (http://bbb.sourceforge.net)
Sweede
12-04-2000, 01:58 AM
Originally posted by klamath:
My guess would be there wouldn't be a benefit (and certainly not with a P2-450). I would guess that this "kid" didn't know what he was doing. Of course, the only way to check for sure is to use a benchmarking app.
For your other problem, I'd suggest removing the Apache and PHP RPMs, and then re-installing both Apache and PHP from source. Using RPMs of important stuff like Apache is a very bad idea, IMHO.
few things we agree on klamath.
the current 1.3.14 RPM apache is a patched version from 1.3.9. its patched 5! times and those patches that are used to patch apache have patches to them.
so you really dont know what your going to get.
if your going to use apache for anything other than goofing around with,
download from source and check out my mini-help http://www.linuxnewbie.org/ubb/smile.gif
http://www.linuxnewbie.org/ubb/Forum21/HTML/001230.html
any other questions, post there and someone will repsond.