Forum Moderators: phranque

Message Too Old, No Replies

Too many apache requests and memory eats up

Apache peaks from Reading requests

         

rgouveia

10:20 pm on Feb 13, 2008 (gmt 0)

10+ Year Member



Hi

Recently we've seen an increased load in our dedicated server due to increased visits to one site.

But something else is happening because, several times a day, the Apaches peaks and stops responding.
The server load goes from a (high but) stable 1.5 to 4 to sometimes 150 in a matter of minutes.

When we restart apache, the 512Mb RAM goes down to 5Mb to 10Mb available RAM in the first 5 minutes, even with lower number of requests, and stays there, also using around 500Mb of swap disc space.
We canīt tell if this was happening in this server before the increased visits, but it certainly doesnīt happens in other server we manage.

Let me just had that we are using Plesk7.5 reload in this server (not an option to change im affraid).

There are some consistencies in this peaks, for example:
- tcp connections raise 3 to 4 times the average number
- netstat reports this connections like this:
tcp6 0 0 11.11.11.11:80 11.11.11.:53565 TIME_WAIT
(the 11.11.11.11 represents our servers IP, meaning this are internal requests?)
- server-status reports many many Reading Requests (see sample bellow)

Does anyway have any idea how we can figure this out?

Thanks

------------ server status sample

Current Time: Wednesday, 13-Feb-2008 22:00:54 WET
Restart Time: Wednesday, 13-Feb-2008 21:54:15 WET
Parent Server Generation: 4
Server uptime: 6 minutes 39 seconds
Total accesses: 11945 - Total Traffic: 79.0 MB
CPU Usage: u121.37 s20.84 cu.07 cs0 - 35.7% CPU load
29.9 requests/sec - 202.7 kB/second - 6.8 kB/request
71 requests currently being processed, 13 idle workers

WKRW_KRR_KRRKKWWKRR_.WRRWWKR_WKWRRKRK_WWR_RKLKW_R.WKR._.RWRKKR__
RR__WRWWWR_..RK.KRKRKKWC....R..R...R............................
................................................................
................................................................


------------ version
Apache/2.0.54 (Debian GNU/Linux) FrontPage/5.0.2.2635 mod_python/3.1.3 Python/2.3.5 PHP/4.3.10-16 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_perl/1.999.21 Perl/v5.8.4

------------ compiled modules
core mod_access mod_auth mod_log_config mod_logio mod_env mod_setenvif prefork http_core mod_mime mod_status mod_autoindex mod_negotiation mod_dir mod_alias mod_so mod_cgi mod_fpcgid mod_include mod_info mod_python mod_perl mod_php4 mod_rewrite mod_ssl mod_suexec mod_userdir

rgouveia

10:52 am on Feb 14, 2008 (gmt 0)

10+ Year Member



Can someone please tell how can I remove installed modules from Apache2? I used to know how to do that in Apache 1.x

I'll start by removing unused modules to see how it goes.

jdMorgan

2:01 pm on Feb 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are there any Apache/*nix debug-command-line experts in the house?

(Bump)

Jim

Frank_Rizzo

3:47 pm on Feb 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First thing to note is that you should add more ram. Ram is so cheap these days - like Ģ15 / $30 per Gb. Little cost to save a lot of hassle.

To remove some modules just rem them out in the httpd.conf file. Rem out a few at a time and restart httpd to see if anything stops working. Obviously only do the ones you know the site is not using and test cautiously with the rest.

What else is running on it? Mysql? Try turning down some of the memory settings in my.cnf

But seriously, consider adding more ram.

rgouveia

4:07 pm on Feb 15, 2008 (gmt 0)

10+ Year Member



Thanks Frank.

We definetly need to add more RAM.

But still theres something that bug we don't understand is why the memory is completly used in the first 5 minutes, and swap goes to 256Mb... everytime even with just a few Apache services.