Page 1 of 1

httpd using 3GB of Memory

Posted: Tue Aug 23, 2016 7:46 pm
by theone85ca
Hey All,

It looks like HTTPd is using over 3GB of memory on my server. The server starts at 944MB and then just ballons very quickly from there. In about a minute its at 3GB.

Any one have any idea what might be causing this?

OS: CentOS 7.2
Vesta is up to date

Thanks,

Re: httpd using 3GB of Memory

Posted: Wed Aug 24, 2016 12:26 am
by Mooticus
Also running Centos 7.2, have the same problem. Hopefully it's fixed in the next update. It uses exactly half of my server's RAM, with little to no traffic.

Re: httpd using 3GB of Memory

Posted: Mon Sep 26, 2016 6:52 am
by BBuchanan1013
Well, what I did was google "Virtualmin on Low Memory Systems"

I've used virtualmin in the past, so thats why I recalled it, anywho, they have a wonderful guide as well as changes to not only Apache, but mysql as well.

Heres the link: https://www.virtualmin.com/documentatio ... ry_systems

But, you'll do some reading before getting to the fun stuff:

Code: Select all

   KeepAlive On
    KeepAliveTimeout 3
    <IfModule prefork.c>

    StartServers       2
    MinSpareServers    2
    MaxSpareServers    5
    ServerLimit      100
    MaxClients       100
    MaxRequestsPerChild  500
    </IfModule>
    <IfModule worker.c>
    StartServers         2
    MaxClients         150
    MinSpareThreads     15
    MaxSpareThreads     50
    ThreadsPerChild     15
    MaxRequestsPerChild  0
    </IfModule>
And for mysql (my.cnf)

Code: Select all

  [mysqld]
    port               = 3306
    socket             = /var/lib/mysql/mysql.sock
    skip-locking
    key_buffer         = 16K
    max_allowed_packet = 1M
    table_cache        = 4
    sort_buffer_size   = 64K
    read_buffer_size   = 256K
    read_rnd_buffer_size = 256K
    net_buffer_length  = 2K
    thread_stack       = 64K
Make the changes where appropriate. Don't just copy and paste.

Re: httpd using 3GB of Memory

Posted: Mon Sep 26, 2016 7:25 am
by mehargags
Though there can be multiple problems, I'd list some of them at the top of my mind:

1. Are you sure your server is secure and none of your sites are compromised ? Compromised sites/servers often show malicious traffic/outgoing processes that lead to peak load.

2. What is the payload of your sites, avg. visits per day, no. of sites on server, DB size, what sites you are using like Wordpress/joomla/PHP or any other info. What is the total no. of concurrent users on your server at a given time ?

3. CentOS-7 user's arent' really happy ones... though I'm an absolute Debian guy, many of my CentOS buddies still prefer CentOS 6.x for stability as well as performance. Try Debian if you can... I'm sure you will love it.