Question
Apache2 processes piling up to fill memory
Hello,
I’m using the 5$ droplet with phpMyAdmin 1-click installation and serving a REST API over apache2.
Couple hours after I restart my apache service, when I use the following command to view processes that use the most memory:
ps -eo pmem,pcpu,rss,vsize,args | sort -k 1 -r | less
I see a lot of the same processes that over time piling up and never being killed, hence filling up the memory to about 90% :
%MEM %CPU RSS VSZ COMMAND
2.9 0.2 30016 500080 /usr/sbin/apache2 -k start
2.8 0.1 28420 498072 /usr/sbin/apache2 -k start
2.8 0.0 28464 500084 /usr/sbin/apache2 -k start
2.7 0.1 27696 498056 /usr/sbin/apache2 -k start
2.7 0.0 27796 498052 /usr/sbin/apache2 -k start
2.7 0.0 27512 499672 /usr/sbin/apache2 -k start
2.7 0.0 27496 498060 /usr/sbin/apache2 -k start
2.7 0.0 27332 279668 /lib/systemd/systemd-journald
2.6 0.2 26956 498068 /usr/sbin/apache2 -k start
2.6 0.2 26460 498068 /usr/sbin/apache2 -k start
2.6 0.1 26616 498068 /usr/sbin/apache2 -k start
2.6 0.1 26392 498048 /usr/sbin/apache2 -k start
2.6 0.1 26340 497964 /usr/sbin/apache2 -k start
2.6 0.1 26280 498032 /usr/sbin/apache2 -k start
2.6 0.0 27116 494872 /usr/sbin/apache2 -k start
2.6 0.0 26964 498004 /usr/sbin/apache2 -k start
2.6 0.0 26296 497972 /usr/sbin/apache2 -k start
2.6 0.0 26288 498068 /usr/sbin/apache2 -k start
2.5 0.3 26168 498028 /usr/sbin/apache2 -k start
2.5 0.3 25952 497976 /usr/sbin/apache2 -k start
As soon as I run “systemctl restart apache2” all of these processes disappear and my used memory decreases by a lot.
And idea about what is wrong with my server?
Thanks in advance.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×