Author |
|
noitcerid
Joined: 17 Jan 2008 Posts: 3 Location: Scottville, MI
|
Posted: Thu 17 Jan '08 19:33 Post subject: Apache stops responding |
|
|
I just registered here, so hopefully this is where I should post this. I've been having some difficulty with Apache stability. It seems like when I get 20-30 people on at once, Apache doesn't serve out pages anymore. I haven't been able to track down exactly what's going on. The memory usage on httpd.exe just kind of continues to grow. It'll stabilize around 300MB or so, and during peak usage I've seen it as high as 600MB. The error log doesn't say anything worth noting. I've been debating trying options like Win32DisableAcceptEx, EnableSendfile,MaxKeepAliveRequests, EnableMMAP. The problem is I don't have two boxes that are identical to test scenarios, so I've been waiting for it to 'crash', change an option, and then wait for it to crash again. Here's a list of options in my http.conf file:
ThreadsPerChild 250
MaxRequestsPerChild 0
Here's a brief benchmark from ab:
Server Software: Apache/2.2.4
Document Length: 7708 bytes
Concurrency Level: 10
Time taken for tests: 2.984471 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 835158 bytes
HTML transferred: 770800 bytes
Requests per second: 33.51 [#/sec] (mean)
Time per request: 298.447 [ms] (mean)
Time per request: 29.845 [ms] (mean, across all concurrent requests)
Transfer rate: 273.08 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.5 0 15
Processing: 140 291 45.9 296 390
Waiting: 93 200 87.1 156 390
Total: 140 291 45.8 296 390
Percentage of the requests served within a certain time (ms)
50% 296
66% 312
75% 312
80% 328
90% 359
95% 375
98% 390
99% 390
100% 390 (longest request)
Here's my server specs:
---------------------------------------------
Dell PowerEdge 2950
8GB RAM
2x Dual-Core 2.00GHz Processors
Windows Server 2003 x64 Enterprise
Apache 2.2.4
PHP 5.2.2
MySQL 5.0.41
Services (other than above)
Microsoft Media Services
AVG Anti-virus (Client)
---------------------------------------------
I'm running the 32-bit versions of all of these. I haven't done enough testing with 64-bit to feel comfortable with all of them (not to mention, there's not too many 64-bit builds of PHP). |
|
Back to top |
|
simra
Joined: 21 Jan 2008 Posts: 1
|
Posted: Mon 21 Jan '08 20:08 Post subject: Same problem |
|
|
Hi, I have the same problem on a low-volume web site. After some period of time the server simply stops responding. Nothing in the logs to indicate a problem. I have a daily scheduled task to restart httpd with a restart signal, but it's still unresponsive, even to requests from localhost. I have to shut down httpd and start it up again to restore normal operations.
Apache 2.2.6
Windows XP Pro SP2.
Antivirus is disabled.
Firewall: Zonealarm 7.0
I hope someone out there can help diagnose. |
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Mon 21 Jan '08 20:14 Post subject: |
|
|
Maybe you should use the newest version of apache. 2.2.4 caused similar problems with me that are fixed now. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 21 Jan '08 20:28 Post subject: |
|
|
try starting apache in debug mode and / or turn on debug in error logs.
Anything in Windows event log? Any special application yourun? Any script with more usage? |
|
Back to top |
|
noitcerid
Joined: 17 Jan 2008 Posts: 3 Location: Scottville, MI
|
Posted: Wed 23 Jan '08 20:39 Post subject: Well.... |
|
|
The Windows Event Log is useless... I haven't turned apache debug on (because it's a live environment). Is it possible that the memory usage is exceeding what 32 bit applications are allowed to use on this 64 bit box? |
|
Back to top |
|
shervin.emami
Joined: 30 Jan 2008 Posts: 1 Location: Brisbane, Australia
|
Posted: Wed 30 Jan '08 7:51 Post subject: |
|
|
Yeah I'm having the same sort of problem. But I've found that certain people cause it to freeze, just by visiting a certain webpage! They're my friends so I know they aren't hacking my page. Once those certain people visit the page (which uses javascript to refresh 3 images once per second), then the whole site freezes! Actually Apache still lets through about 5% of the requests.
Does anyone have an idea what the cause might be? The obvious thing is that webpage, since normal static webpages dont freeze the server, but I don't think a badly written webpage should be able to crash a server? The server's CPU & RAM doesn't jump when it happens and there's no error messages besides the warning about all 250 child threads being used up. |
|
Back to top |
|
Obsidian
Joined: 30 Jan 2008 Posts: 3
|
Posted: Wed 30 Jan '08 8:25 Post subject: |
|
|
shervin.emami wrote: | Yeah I'm having the same sort of problem. But I've found that certain people cause it to freeze, just by visiting a certain webpage! They're my friends so I know they aren't hacking my page. Once those certain people visit the page (which uses javascript to refresh 3 images once per second), then the whole site freezes! Actually Apache still lets through about 5% of the requests.
Does anyone have an idea what the cause might be? The obvious thing is that webpage, since normal static webpages dont freeze the server, but I don't think a badly written webpage should be able to crash a server? The server's CPU & RAM doesn't jump when it happens and there's no error messages besides the warning about all 250 child threads being used up. |
A badly written webpage can crash a server (trust me I wrote a few when I was learning years ago although this was with serverside scripts not clientside.)
If you read this http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadsperchild
The apache docs for threads per child it says "If using an MPM like mpm_winnt, where there is only one child process, this number should be high enough to handle the entire load of the server." And mpm_winnt is the default for windows nt so if you're using it that could be your problem you simply are receiving more requests than you can handle. What's your limit set at? |
|
Back to top |
|
noitcerid
Joined: 17 Jan 2008 Posts: 3 Location: Scottville, MI
|
Posted: Thu 31 Jan '08 16:35 Post subject: Hmmm.... |
|
|
I haven't noticed any specific page that causes it. My threadsperchild is set to about 1920. I'm expecting somewhere around 75 users at a maximum time. My web application is heavily MySQL drawn also, if that matters.
I'm a little suspect of my PHP version with Apache.
PHP - 5.1.2
Apache - 2.2.4 |
|
Back to top |
|