Results 1 to 13 of 13
  1. #1
    Join Date
    Sep 2008
    Posts
    148

    apache Eats up my memory

    Hello

    I have One site On my Server . and the Apache Eats up my Memory . i have 2GB Gurentee and 3Gb with Burest ..

    I use wooopra to track my site Visitors and it has pretty good Live Counter and i do not have more than 30 Visitor in time but yet the apache Hag More than 2 GB ..

    See top
    http://img682.imageshack.us/img682/4999/apache.png


    How do i Optimize apache to help reduce the Much Ram Use.

  2. #2
    Join Date
    Dec 2007
    Posts
    1,277
    The image you posted isn't really showing the memory usage. It's showing a % but who's doing the math.

    Just run 'ps aux |grep httpd

    Then you can easily see how much apache is using. Judging from what you posted so far it's not really out of line but my experience with virtualization + servers isn't great.
    James Paul Woods
    Operations Manager
    HostKitty Internet Services

  3. #3
    That looks fine to me....? :/

  4. #4
    Join Date
    Sep 2008
    Posts
    148
    Well tell you the truth that looked OK to me too . but i do not know when you have only 15-30 Visitors but your Memory Gone . 2GB ..

    when retart the apache the memory drops to 300MB or less .. until the apache Hag it again ..

    this is the httpd.conf

    #
    # This configuration file reflects default settings for Apache HTTP Server.
    #
    # You may change these, but chances are that you may not need to.
    #

    #
    # Timeout: The number of seconds before receives and sends time out.
    #
    Timeout 60

    #
    # KeepAlive: Whether or not to allow persistent connections (more than
    # one request per connection). Set to "Off" to deactivate.
    #
    KeepAlive On

    #
    # MaxKeepAliveRequests: The maximum number of requests to allow
    # during a persistent connection. Set to 0 to allow an unlimited amount.
    # We recommend you leave this number high, for maximum performance.
    #
    MaxKeepAliveRequests 100

    #
    # KeepAliveTimeout: Number of seconds to wait for the next request from the
    # same client on the same connection.
    #
    KeepAliveTimeout 1

    #
    # UseCanonicalName: Determines how Apache constructs self-referencing
    # URLs and the SERVER_NAME and SERVER_PORT variables.
    # When set "Off", Apache will use the Hostname and Port supplied
    # by the client. When set "On", Apache will use the value of the
    # ServerName directive.
    #
    UseCanonicalName Off

    #
    # AccessFileName: The name of the file to look for in each directory
    # for additional configuration directives. See also the AllowOverride
    # directive.
    #
    AccessFileName .htaccess

    #
    # ServerTokens
    # This directive configures what you return as the Server HTTP response
    # Header. The default is 'Full' which sends information about the OS-Type
    # and compiled in modules.
    # Set to one of: Full | OS | Minor | Minimal | Major | Prod
    # where Full conveys the most information, and Prod the least.
    #
    ServerTokens Major

    #
    # Optionally add a line containing the server version and virtual host
    # name to server-generated pages (internal error documents, FTP directory
    # listings, mod_status and mod_info output etc., but not CGI generated
    # documents or custom error documents).
    # Set to "EMail" to also include a mailto: link to the ServerAdmin.
    # Set to one of: On | Off | EMail
    #
    ServerSignature On

    #
    # HostnameLookups: Log the names of clients or just their IP addresses
    # e.g., www.apache.org (on) or 204.62.129.132 (off).
    # The default is off because it'd be overall better for the net if people
    # had to knowingly turn this feature on, since enabling it means that
    # each client request will result in AT LEAST one lookup request to the
    # nameserver.
    #
    HostnameLookups Off




    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>

  5. #5
    Join Date
    Jun 2006
    Location
    Houston, Texas
    Posts
    9
    Excessive memory usage from apache is usually because of alot of connections to apache using keepalive. check how many connections you have into apache at the time the memory gets real low. Also make sure you are not being attacked on port 80 trying to hack apache to gain root access. Many times a hack bot will drive apache crazy trying to exploit it. check your connections via netstat using this command: netstat -f inet -an |grep 80

  6. #6
    Join Date
    Sep 2008
    Posts
    148
    Quote Originally Posted by winkbsd View Post
    Excessive memory usage from apache is usually because of alot of connections to apache using keepalive. check how many connections you have into apache at the time the memory gets real low. Also make sure you are not being attacked on port 80 trying to hack apache to gain root access. Many times a hack bot will drive apache crazy trying to exploit it. check your connections via netstat using this command: netstat -f inet -an |grep 80
    no there is no attempt of hacking .. I do have Audio Stearming .. Could it be the Problem ?

  7. #7
    Join Date
    Jun 2006
    Location
    Houston, Texas
    Posts
    9
    This could be 100% the problem. Streaming audio is very resource intensive.

  8. #8
    Join Date
    Jun 2009
    Posts
    1,219
    Yep. You need more memory and/or faster drives!

  9. #9
    Join Date
    Sep 2008
    Posts
    148
    i thought 2GB . Should Be enoght Memory..

  10. #10
    Join Date
    Aug 2002
    Location
    Milton Keynes
    Posts
    352
    Quote Originally Posted by winkbsd View Post
    This could be 100% the problem. Streaming audio is very resource intensive.
    Other than disk access there's no excuse for it to take up that much memory, the problem is with Apache's serving model and requiring a process for each connection (along with mod_php and whatever else you have loaded).

    I manage 300 concurrent h264 video streams with no problems, the answer? Don't use Apache for it.

  11. #11
    Quote Originally Posted by drspliff View Post
    Other than disk access there's no excuse for it to take up that much memory, the problem is with Apache's serving model and requiring a process for each connection (along with mod_php and whatever else you have loaded).

    I manage 300 concurrent h264 video streams with no problems, the answer? Don't use Apache for it.
    What do you recommend other than apache httpd server?

    Thanks.
    Alex.

  12. #12
    Join Date
    Sep 2008
    Posts
    148
    Quote Originally Posted by alxsss View Post
    What do you recommend other than apache httpd server?

    Thanks.
    Alex.
    i use Nginx now instead appache . if you have Cpanel . download Nginx plugin from nginxcp.com

    if you do not have cpanel , u need to google it how to install it .

  13. #13
    Excessive memory usage from apache is usually because of a lot of connections to apache using keepalive. check how many connections you have into apache at the time when memory gets real low. Also make sure you are not being attacked on port 80 trying to hack apache to gain root access. Many times a hack bot will drive apache crazy trying to exploit it. check your connections via netstat using this command: netstat -f inet -an |grep 80

Similar Threads

  1. Replies: 10
    Last Post: 12-16-2008, 03:13 PM
  2. BQ eats memory?
    By Technolojesus in forum Dedicated Server
    Replies: 4
    Last Post: 02-26-2008, 12:06 AM
  3. FireFox eats up a ton of memory
    By HostSentry in forum Computers and Peripherals
    Replies: 19
    Last Post: 10-11-2007, 01:41 PM
  4. Apache memory madness
    By Boks in forum Hosting Security and Technology
    Replies: 4
    Last Post: 01-04-2005, 10:30 PM
  5. OH Baby my boyfriend eats egg. OH Baby my girlfriend eats egg!
    By YUPAPA in forum Shared Hosting Offers
    Replies: 1
    Last Post: 04-19-2003, 05:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •