Welcome to WebmasterWorld Guest from 50.19.135.67

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Apache slows to a grinding halt

apache

     

troubled dave

10:51 am on May 27, 2011 (gmt 0)



we have apache 2.2.18 running on windows server 2003 and when we get a high number of visitors (40k an hour) apache seems to slow and slow and slow then grind to a complete stand still.

Anyone know why this would be?

The server is cloud based with 4gb ram

The .conf file can be seen here [pastebin.ca...]

wheel

1:12 pm on May 27, 2011 (gmt 0)

WebmasterWorld Senior Member wheel is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I'm not an expert so following my advice can lead to bad things.

First, there are two numbers to look at in apache. One is how many live threads there are. The second is how many child threads each child can spawn. So maybe you have 10 threads running all the time, and each 10 can spawn another 10 - so when it's slow you've got 10, when it's busy you've got max 100.

Changing those numbers up and down can help I believe.

Secondly, I would just google something like 'optimizing apache'. There may be some easy tweaks. For example, you can turn of htaccess, so that apache doesn't have to look for an htaccess file every time it reads a file. Granted, that's only a small tweak.

Thirdly, be suspicious that this is actually apache. My first suspicion wouldn't be apache,it would be whatever database program you're using. Much more likely the server's going to bog down under the weight of database queries than apache. Apache on it's own can serve some unbelievable amount of queries.So this third suggestions should actually be my first suggestion :).

Perhaps the experts will provide better info.

jdMorgan

1:00 am on May 28, 2011 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Correction and amplification: Apache on it's own can serve some unbelievable amount of queries. even on a very old/slow server. I second looking into database lookups and any large/complex scripts you may have.

If some content is only "mildly-dynamic," then consider caching static copies for a short period of time and serving those cached copies instead of re-generating each page every time it is requested by a client (and doing the requisite DB lookups repeatedly). For example, most sites won't really suffer if the user gets a page that is only stale by a maximum of one minute, if time is the only factor.

Jim

tangor

1:49 am on May 28, 2011 (gmt 0)

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Huzzah and welcome to Webmasterworld, troubled dave! wheel and jdMorgan offer good advice. Check the content offered and HOW it is offered. This is key. Static pages v generated v database queries, etc.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month