logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache stops responding
Author
noitcerid



Joined: 17 Jan 2008
Posts: 3
Location: Scottville, MI

PostPosted: Thu 17 Jan '08 19:33    Post subject: Apache stops responding Reply with quote

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

PostPosted: Mon 21 Jan '08 20:08    Post subject: Same problem Reply with quote

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

PostPosted: Mon 21 Jan '08 20:14    Post subject: Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Mon 21 Jan '08 20:28    Post subject: Reply with quote

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

PostPosted: Wed 23 Jan '08 20:39    Post subject: Well.... Reply with quote

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

PostPosted: Wed 30 Jan '08 7:51    Post subject: Reply with quote

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

PostPosted: Wed 30 Jan '08 8:25    Post subject: Reply with quote

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

PostPosted: Thu 31 Jan '08 16:35    Post subject: Hmmm.... Reply with quote

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


Reply to topic   Topic: Apache stops responding View previous topic :: View next topic
Post new topic   Forum Index -> Apache