View Full Version : Apache
Sean
May 5th, 2007, 06:51 AM
Can anyone help me out? Are these apache settings good or bad?
Timeout 60
KeepAlive On
MaxKeepAliveRequests 65
KeepAliveTimeout 10
MaxClients 150
Server information:
Processor #1 Vendor: GenuineIntel
Processor #1 Name: Intel(R) Pentium(R) 4 CPU 2.53GHz
Processor #1 speed: 2533.401 MHz
Processor #1 cache size: 512 KB
Memory: 1033004k/1046784k available
magnet
May 5th, 2007, 07:12 AM
Below are my settings, they work really well, never had any problems.
Timeout 300
KeepAlive Off
KeepAliveTimeout 3
MinSpareServers 32
MaxSpareServers 64
StartServers 5
MaxClients 350
MaxRequestsPerChild 1000
PGZ
May 5th, 2007, 07:13 AM
Well if you keep it the way it is you will only be able to have 150 connections at onetime. Thats not good at all.
Mine is set at 2000
rob
May 5th, 2007, 07:25 AM
I wouldn't set maxclients so high...
here's ours that seems to work fine. this is just for serving the main website though.. apache sucks for serving static (images, etc) files so we use nginx for our images which reduces overall server load by a goood deal
obviously settings are dependent on your server specs and theres not a 'best for all' solution, itll take a lot of tweaking on your end
Timeout 10
KeepAlive On
MaxKeepAliveRequests 10000
KeepAliveTimeout 3
StartServers 32
MinSpareServers 32
MaxSpareServers 64
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 10000
PGZ
May 5th, 2007, 07:53 AM
I wouldn't set maxclients so high...
here's ours that seems to work fine. this is just for serving the main website though.. apache sucks for serving static (images, etc) files so we use nginx for our images which reduces overall server load by a goood deal
obviously settings are dependent on your server specs and theres not a 'best for all' solution, itll take a lot of tweaking on your end
Timeout 10
KeepAlive On
MaxKeepAliveRequests 10000
KeepAliveTimeout 3
StartServers 32
MinSpareServers 32
MaxSpareServers 64
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 10000
There are 933 people on my site right now so that has to be set that high cause if not the site would be SLOOOOOOOOOWWWWWWWWW.
rob
May 5th, 2007, 08:13 AM
There are 933 people on my site right now so that has to be set that high cause if not the site would be SLOOOOOOOOOWWWWWWWWW.
I was just saying for him it wouldn't be that good because of his low server specs.. it can actually cause problems having it too high.
How much RAM do you have in your server? Do you serve all of your images from Apache as well?
PGZ
May 5th, 2007, 08:22 AM
I was just saying for him it wouldn't be that good because of his low server specs.. it can actually cause problems having it too high.
How much RAM do you have in your server? Do you serve all of your images from Apache as well?
No images arent served from this server. The Generators are though. There are 6 Gigs of Ram.
If the images were hosted on this server it would DIE. It only has enough power to actually handle the Traffic to the site and keep the site moving pretty quick.
Sean
May 5th, 2007, 08:30 AM
Thanks guys!
mincioni
May 7th, 2007, 01:22 PM
Is it better to have KeepAlive On or Off?
nurie
May 21st, 2007, 01:53 PM
nice info thanks..
niktesla
June 14th, 2007, 03:33 PM
This may be useful for high-volume sites.
Timeout 10
KeepAlive On
MaxKeepAliveRequests 0
KeepAliveTimeout 2
ServerLimit 8192
StartServers 32
MinSpareServers 6
MaxSpareServers 64
MaxClients 8192
MaxRequestsPerChild 100000
Keep in mind I have the hardware to backup these settings.
2 Servers Each with:
Processors: 2 x 64-bit AMD Dual Core Opteron 265 1.8ghz (2MB L2 Cache)
RAM: 8GB
Disks: 2 x 160GB:SATA:7200RPM RAID
Connection: 100mbps up/down
I don't know the minimum requirements to run this config, just what's working for me. Hope this helpful to someone.
mincioni
June 14th, 2007, 04:21 PM
MaxKeepAliveRequests 0
Why do you set this to zero?
Why not 8192?
niktesla
June 14th, 2007, 04:36 PM
Why do you set this to zero?
Why not 8192?
I read somewhere about there being an advantage to having is set to 0=unlimited
mincioni
June 14th, 2007, 04:50 PM
Gotcha.
I set MaxKeepAliveRequests to MaxClients to prevent a possible runaway event from crashing my server.
niktesla
June 14th, 2007, 04:56 PM
I set MaxKeepAliveRequests to MaxClients to prevent a possible runaway event from crashing my server.
what kind of runaway event? what causes runaway events?
mincioni
June 14th, 2007, 05:25 PM
An abnormally high number of requests (e.g., a DoS attack) can sometimes cause a runaway server event, esp. if KeepAlive is On. I've read that it's best to set hard limits on all of these Apache directives to help prevent possible runaways.
Are you getting close to your 8192 requests? IMO, you may be able to throttle MaxClients & ServerLimit back to conserve resources.
niktesla
June 14th, 2007, 07:00 PM
An abnormally high number of requests (e.g., a DoS attack) can sometimes cause a runaway server event, esp. if KeepAlive is On. I've read that it's best to set hard limits on all of these Apache directives to help prevent possible runaways.
Are you getting close to your 8192 requests? IMO, you may be able to throttle MaxClients & ServerLimit back to conserve resources.
I've setup my Firewall to handle DoS attacks and what not. However, I will change my settings and see. You can never be to careful, especially if it only helps and doesn't hurt.
mincioni
June 15th, 2007, 06:08 AM
Do you have a CiscoGuard upstream of your server?
PGZ
June 15th, 2007, 06:39 AM
I've setup my Firewall to handle DoS attacks and what not. However, I will change my settings and see. You can never be to careful, especially if it only helps and doesn't hurt.
DOS attacks eat firewalls for dinner.....Good luck on that one.
mbhmirc
June 20th, 2007, 02:13 PM
re dos attacks check apache logs for patterns such as their useragent. If you id that you can grep all their ip's and then block them doing requests if it's a http style attack. If it's a syn etc you need to look at someone with the capability to handle large traffic spikes. Inforelay have 1gbs connections for clients and have pritty cheap ddos protection to boot :)
myspacemaster
June 28th, 2007, 07:27 AM
I think it's a bad idea to set Timeout to 10, by doing so, you may kick off those modem users.
mincioni
June 28th, 2007, 08:22 AM
I agree, I use
Timeout 300
and it works fine for me.
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.