homepage Welcome to WebmasterWorld Guest from 54.205.189.156
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Apache hanging 10 sec. after restart
All goes well but sites unavailable after 10 seconds
kevinius




msg:1505557
 7:39 am on Feb 13, 2006 (gmt 0)

Hi,

I'm running several websites on a dedicated server.

- AMD Athlon 64 3000+ 2.0Ghz
- 512MB DDR RAM PC 3200
- Connection: 100 Mbit
- Debian os installed
- Plesk 7.5.3 installed

I have 2 sites running on the server. The first one has about 1000 visitors/dag the second about 2000 visitors/day.

The problem is that the sites are very slow. A page load takes about 1 minute. I have checked the log files but nothing seems to be realy wrong here. When i restart apache service all runs well for about 10 seconds. When the 10 sec. are up the problem keeps reoccurring.

Any help would be kindly appreciated thx.

 

jamie




msg:1505558
 8:15 am on Feb 13, 2006 (gmt 0)

hi kevinius,

i'm no apache expert, but some things that occurs to me:

> are you sites dynamically generated or static pages? if they are dynamic, can you upload a static version of some of these pages to check that it is apache and not the page-generation which causes the slowdown?

> does running a top from the command line give any indication of excess apache load? while running top, press u and then www-data (prob your debian apache user) - you'll get a list of all apache processes - are they really bogging the machine down?

apologies if you've done all this ;)

Frank_Rizzo




msg:1505559
 10:18 am on Feb 13, 2006 (gmt 0)

Rather than just restarting apache what happens if you totally reboot the server?

What's changed recently? Have you upgraded / installed anything?

Is this raid? Can you check the status of the raid if yes?

Have you checked all the logs and not just apache?

kevinius




msg:1505560
 1:00 pm on Feb 13, 2006 (gmt 0)

Hi, thx for helping here...

Pages are dynamically (php), no change when running static files. Rebooting doesn't help. The sites log files don't seem to have any special things in it.

This is what i get when typing top:

top - 13:52:30 up 4:51, 1 user, load average: 10.53, 10.59, 20.93
Tasks: 337 total, 1 running, 336 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.8% us, 3.0% sy, 0.0% ni, 0.0% id, 82.6% wa, 13.6% hi, 0.0% si
Mem: 482668k total, 481844k used, 824k free, 792k buffers
Swap: 983032k total, 600800k used, 382232k free, 16524k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
37 root 15 0 0 0 0 D 0.3 0.0 2:43.93 kswapd0
2784 mailman 16 0 11856 1624 6768 S 0.3 0.3 0:01.47 python
4389 apache 15 0 27760 10m 18m D 0.3 2.2 0:00.74 httpd
5069 apache 15 0 23844 9.9m 15m D 0.3 2.1 0:00.34 httpd
5078 apache 15 0 23980 10m 15m D 0.3 2.3 0:00.43 httpd
5884 root 17 0 3928 1104 1664 R 0.3 0.2 0:00.08 top
1 root 16 0 3092 424 1408 S 0.0 0.1 0:01.78 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
3 root 5 -10 0 0 0 S 0.0 0.0 0:01.02 events/0
4 root 9 -10 0 0 0 S 0.0 0.0 0:00.00 khelper
5 root 15 -10 0 0 0 S 0.0 0.0 0:00.00 kacpid
25 root 5 -10 0 0 0 S 0.0 0.0 0:00.20 kblockd/0
26 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khubd
38 root 9 -10 0 0 0 S 0.0 0.0 0:00.00 aio/0
110 root 25 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
183 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 kmirrord/0
192 root 15 0 0 0 0 S 0.0 0.0 0:05.74 kjournald
1073 root 6 -10 2720 356 1340 S 0.0 0.1 0:00.06 udevd
1342 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khpsbpkt
1359 root 16 0 0 0 0 S 0.0 0.0 0:00.00 knodemgrd_0
1453 root 19 0 0 0 0 S 0.0 0.0 0:00.00 kjournald

The Contractor




msg:1505561
 2:24 pm on Feb 13, 2006 (gmt 0)

I'm certainly not an expert, but I started on a dedicated about 3-weeks ago and it seems like your load averages are high along with your memory usage (may want to add more). I have about 15 active sites on it though there are maybe 30-40 domains. I have Dell single Xeon (3 ghz) and 2 gigs of ram.
top - 07:52:47 up 20 days, 18:11, 1 user, load average: 0.06, 0.05, 0.04 
Tasks: 154 total, 1 running, 153 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.9% us, 0.3% sy, 0.0% ni, 82.4% id, 0.3% wa, 0.0% hi, 0.0% si
Mem: 2074760k total, 1481268k used, 593492k free, 192284k buffers
Swap: 2096440k total, 144k used, 2096296k free, 823536k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11708 httpd 16 0 34048 21m 4512 S 17.0 1.1 1:07.96 httpd
11756 httpd 15 0 34460 21m 4416 S 9.3 1.1 1:07.32 httpd
11662 httpd 15 0 34368 21m 4508 S 3.0 1.1 0:59.42 httpd
11796 httpd 15 0 30912 18m 4404 S 2.7 0.9 1:02.48 httpd
11659 httpd 15 0 35140 22m 4500 S 2.3 1.1 1:04.76 httpd
11653 root 15 0 2448 556 412 S 0.3 0.0 0:02.09 rotatelogspsoft
1 root 16 0 3304 560 476 S 0.0 0.0 0:27.11 init
2 root RT 0 0 0 0 S 0.0 0.0 0:02.84 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.07 ksoftirqd/0
4 root RT 0 0 0 0 S 0.0 0.0 0:01.98 migration/1
5 root 34 19 0 0 0 S 0.0 0.0 0:00.06 ksoftirqd/1
6 root 5 -10 0 0 0 S 0.0 0.0 0:01.45 events/0
7 root 5 -10 0 0 0 S 0.0 0.0 0:01.11 events/1
8 root 7 -10 0 0 0 S 0.0 0.0 0:00.00 khelper
9 root 15 -10 0 0 0 S 0.0 0.0 0:00.00 kacpid
29 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
30 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/1
40 root 15 0 0 0 0 S 0.0 0.0 0:00.24 pdflush
31 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khubd
43 root 14 -10 0 0 0 S 0.0 0.0 0:00.00 aio/0
44 root 10 -10 0 0 0 S 0.0 0.0 0:00.00 aio/1
42 root 15 0 0 0 0 S 0.0 0.0 0:05.33 kswapd0
117 root 25 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
182 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 ata/0
183 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 ata/1
185 root 21 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
186 root 22 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
207 root 15 0 0 0 0 S 0.0 0.0 0:14.96 kjournald
1041 root 6 -10 1840 456 380 S 0.0 0.0 0:00.00 udevd
1093 root 25 0 0 0 0 S 0.0 0.0 0:00.00 shpchpd_event

Not sure if the above helps or not.

Frank_Rizzo




msg:1505562
 3:58 pm on Feb 13, 2006 (gmt 0)

Swap: 983032k total, 600800k used

That doesn't look right. Seems to be a lot of swapping going on.

Adding more ram will help but you may want to investigate where your ram is going.

What database are you running? How big are the tables? If MySQL have you optimised the my.cnf.

First thing though - get more ram added. 1Gb only costs about $100 for the part. But the webhosters will most probably want to proft from it by charging you $xx per month. Do a deal!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved