Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: web server woes!



Thanks for your ideas, Max. It went all day yesterday without saturating, but when I got up this morning, there were dozens of httpd processes, and lookupd was soaking up 85% of the CPU, load average 12!

On 13 Jun 2005, at 15:38, Max Roeleveld - Qualion Internet Services wrote:

Op 13-jun-05 om 22:17 heeft Jan Steinman het volgende geschreven:

what kind of sites are you hosting?

My sites are of three kinds: hand-coded static sites (very snappy), a hand-coded PHP/MySQL artists' gallery package (still pretty lightweight), and MediaWiki (slow as a slug :-).


When I have this problem, it isn't necessarily the slow MediaWiki sites that are stuck. But it's always a spider at the end of the log. (Of course, that may simply be statistical probability... :-)

Depending on how much memory the G4 has...

1.12GB. It's been plenty so far.

is Apache doing DNS lookups?

It's not supposed to. My logs all have IP addresses in them.

When top reaced 0% idle, was named anywhere near the busiest processes (top -u)?

No. As noted, lookupd seems to be the major hog. Even after reading the man page, I can't claim I understand why. It seems to be serving as a cached for named, among other things?


Of course, blocking all search engine bots is not a long term solution.

Exactly! (Although I don't feel too bad about blocking msn... :-)

How many child processes is Apache instructed to keep right now?

The default. I think it's 5.

What happens if you increase it...

I don't think that's the problem, because:

Does the slowness persist (if you do nothing), or does it fade away after the bots did their thing?

It persists forever, or until I restart Apache, whichever comes first! :-)


During the slowdown, what are the most CPU-hungry processes (top -u)?

I have not actually done top -u, but in terms of %CPU, it is always lookupd.


Does Apache complain about anything (in the error log)?

It has a few things it doesn't like -- nothing that would seem to tie up lookupd. Missing files, a few PHP errors that I should clean up, but have been there forever (undefined index, undefined variable, etc.)


How about memory? How much of it is there? How much of it is free? How about VM?

Unfortunately, it's purring along just fine at the moment. I keep top running in an ssh terminal to keep track of it. I'll note these things next time. But it doesn't seem to be thrashing when it slows -- just idle time goes away and the CPU is saturated. If it were VM related, I'd expect other symptoms.


(Yes, I know, it's bad manners to answer a question with more questions =] )

No, thanks! I've been administering Unix systems for 20 years, but am at a bit of a loss on this, so more questions are good!


Here's what top -u looks like at the moment, when it's working fine:

Processes: 83 total, 2 running, 81 sleeping... 196 threads 12:15:28
Load Avg: 1.03, 1.17, 0.94 CPU usage: 24.8% user, 20.9% sys, 54.3% idle
SharedLibs: num = 111, resident = 14.2M code, 1.52M data, 4.42M LinkEdit
MemRegions: num = 11383, resident = 140M + 6.41M private, 43.2M shared
PhysMem: 124M wired, 118M active, 349M inactive, 592M used, 559M free
VM: 4.28G + 70.1M 69701(0) pageins, 236728(0) pageouts


PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
11923 top 23.1% 2:36.89 1 22 26 360K 464K 732K 27.1M
5986 lookupd 21.6% 26:52:58 3 40 2327 65.5M+ 776K 45.4M 264M
0 kernel_tas 0.7% 1:52:12 34 2 3171 23.1M 0K 100M 775M
92 notifyd 0.7% 52:24.11 2 84 26 108K 388K 528K 18.2M
212 netinfod 0.0% 3:03:54 1 12 33 240K 452K 568K 27.0M
240 named 0.0% 27:56.35 1 10 56 828K 988K 1.49M 74.9M
295 java 0.0% 27:44.44 27 303 208 5.82M 2.14M 6.35M 296M
78 syslogd 0.0% 11:42.81 1 10 17 76K 380K 560K 17.7M
410 mysqld 0.0% 11:29.85 10 59 108 7.04M 1.52M 7.77M 54.1M
4394 Terminal 0.0% 6:17.87 3 66 157 2.32M 5.71M 5.12M 140M
4395 Console 0.0% 5:07.00 1 58 108 892K 10.1M 9.32M 109M
113 update 0.0% 5:04.22 1 9 16 16K 360K 256K 17.6M
180 WindowServ 0.0% 3:25.20 2 118 138 2.42M 16.4M 17.8M 74.5M
459 AppleFileS 0.0% 2:19.57 7 64 47 744K 1.43M 1.55M 34.4M
11500 httpd 0.0% 1:58.79 1 10 442 3.58M 8.89M 12.8M 59.8M
11516 httpd 0.0% 1:48.51 1 10 419 3.58M 8.89M 12.8M 59.8M
11520 httpd 0.0% 1:42.76 1 10 386 3.55M 8.89M 12.6M 59.8M
11519 httpd 0.0% 1:37.23 1 10 344 3.49M 8.89M 12.8M 59.8M
11518 httpd 0.0% 1:23.18 1 10 445 7.10M 8.93M 15.6M 67.9M
515 master 0.0% 1:05.28 1 13 19 120K 488K 220K 26.8M


:::: The tragedy of modern war is not so much that young men die but that they die fighting each other... instead of their real enemies back home in the capitals. -- Edward Abbey
:::: Jan Steinman, http://www.Bytesmiths.com/Events



_______________________________________________ Do not post admin requests to the list. They will be ignored. Web-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/web-dev/email@hidden

This email sent to email@hidden
References: 
 >web server woes! (From: Jan Steinman <email@hidden>)
 >Re: web server woes! (From: Max Roeleveld - Qualion Internet Services <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.