[ Bloke.com || Linux || JavaScript || Java || Volleyball || Link Me ]
Free: [ Guestbook || MessageBot || Plugins || Counter || AusPrices || Advertise ]

Home - Linux - httpd

Apache Web server.

Everybody uses it, I kinda wish I didn't need to, but when 2.0 matures, that should be cool. In the mean time I ran into a problem where I ran over MaxClients (256), since I was using it for an ad server (further note: the real problem was that something was chewing up the clients, and fixed now, I'm back to 256 clients). There has got to be a better way than I say here, but it works for me.

On solaris, I've had trouble with apache 2.0 hanging/crashing.


rpm --rebuild apache-1.3.23-14.src.rpm
cd /usr/src/redhat/BUILD/apache_1.3.23/src
vi include/httpd.h
# change the following lines to say: (or whatever your limit)
	//#define HARD_SERVER_LIMIT 256
	#define HARD_SERVER_LIMIT 1024
cd ..
mv /usr/sbin/httpd /usr/sbin/httpd.orig
cp src/httpd /usr/sbin/httpd
#Update MaxClients in /etc/httpd/conf/httpd.conf
/etc/rc.d/init.d/httpd restart
You should check how much memory your have on your machine, before increasing the size. For example my httpd's have a RSS (Resident Set Size) of about 2Meg, so on a machine with 2Gig, I could run 700-800 clients. You shouldn't increase the size such that it is paging.

To get your RSS down to 2Meg/process, you will need to remove all unnecessary modules. A good way to do this is to remove all modules, and only add them in when you need them.

From (my) memory, high memory modules are perl/php/SSL...


Last Change: Monday, 10-Jan-2005 07:43:04 EST


The information provided within these pages is provided AS IS, and without any warranty. Following these directions may (but not limited to) crash your computer, delete all the information on your hard disk, open up security holes or cause your house to burn down. I made these pages to provide some information about the setup that I have done, but I did not proofread it for correctness, and in most cases did not test it. There are commands in these pages that would definately delete or corrupt all the data on your computer (especially the dualboot section). In fact it happened to me.... So you are on your own!

Cameron Gregory