Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Help with Server Configuration - Make it more stable |
|
Author |
|
snookieboy
Joined: 03 May 2009 Posts: 4
|
Posted: Sun 03 May '09 12:39 Post subject: Help with Server Configuration - Make it more stable |
|
|
Hello,
I'm currently having problems with Apache on a Windows Server as over the course of a day or two it just becomes sluggish and eventually dies causing "document contains no data" errors to appear to clients. I was told to look at my configuration and I've been playing around with it all day.
Its currently set to:
ThreadsPerChild 50
MaxRequestsPerChild 0
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
I was just wondering what the best settings were? The box is a 1.6ghz with 1gb of Ram. Just really want to get the box going so it can be left for days on end without me having to go in and manually restart it every day
Many thanks! |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Sun 03 May '09 13:01 Post subject: |
|
|
Anything in the Apache error.log ?
ThreadsPerChild 50 is low, try the most common used 250.
Also sluggish behaviour can be caused by AcceptEx() which is enabled by default. Try to put in httpd.conf:
Win32DisableAcceptEx
EnableSendfile Off
EnableMMAP off
Steffen |
|
Back to top |
|
snookieboy
Joined: 03 May 2009 Posts: 4
|
Posted: Sun 03 May '09 13:27 Post subject: |
|
|
I've added the changes you recommended and everything seems fine in the "error log":
[Sun May 03 12:24:42 2009] [notice] Apache/2.2.11 (Win32) PHP/5.2.8 configured -- resuming normal operations
[Sun May 03 12:24:42 2009] [notice] Server built: Dec 10 2008 00:10:06
[Sun May 03 12:24:42 2009] [notice] Parent: Created child process 1276
[Sun May 03 12:24:42 2009] [notice] Disabled use of AcceptEx() WinSock2 API
[Sun May 03 12:24:42 2009] [notice] Child 1276: Child process is running
[Sun May 03 12:24:42 2009] [notice] Child 1276: Acquired the start mutex.
[Sun May 03 12:24:42 2009] [notice] Child 1276: Starting 250 worker threads.
[Sun May 03 12:24:42 2009] [notice] Child 1276: Listening on port 7555.
[Sun May 03 12:24:42 2009] [notice] Child 1276: Listening on port 2088.
[Sun May 03 12:24:42 2009] [notice] Child 1276: Listening on port 80.
Is there anything I should put in MaxRequestsPerChild? Someone told me that would make Apache restart the child thread every now and again and should keep apache from growing out of control?
Many thanks for your help |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Sun 03 May '09 13:40 Post subject: |
|
|
Best to leave it on MaxRequestsPerChild 0
Steffen |
|
Back to top |
|
|
|
|
|
|