Centos 6 + Nginx / Apache: High CPU and memory usage

ayberk

Verified User
Joined
Apr 18, 2016
Messages
33
Hi,

Although we are getting the same amount of real time visitors as usual, the CPU usage is increased substantially today and we can't resolve this. I share the related image with you. How to uninstall Apache server?

Directadmin:

http://imgur.com/em8K1NB

Apache 2.4.20 ( Reverse-proxy NGINX + Apache)
DirectAdmin 1.50.0
Exim 4.84
MySQL 5.5.31
Named 9.8.2rc1
sshd
dovecot 2.2.23
pure-ftpd 1.0.42
Php 5.5.34

16GB RAM -- 128 GB SSD
Apache 2.2.31
MySQL 5.5.31
CentOS 6.0 64-Bit
Wordpress + Vanilla Forums
Daily pageviews 180K
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,853
Location
GMT +7.00
Hello,

Check apache's server-status, and logs for POST requests. Your sites might be under spam, brute-force attacks.
 

ayberk

Verified User
Joined
Apr 18, 2016
Messages
33
Hi,

If i switch from Apache to NGINX does it solve my problem?

Code:
Max Requests	Per Child: 10000 - Keep Alive: on - Max Per Connection: 100
Timeouts	Connection: 60 - Keep-Alive: 2
Code:
top - 15:02:51 up 18:09,  1 user, [B] load average: 211.19[/B], 208.43, 196.65
Tasks: 460 total, 215 running, 244 sleeping,   0 stopped,   1 zombie
Cpu(s): 78.4%us, 21.3%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:  16247560k total, 13702104k used,  2545456k free,   713284k buffers
Swap:  8191996k total,   151044k used,  8040952k free,  3944100k cached
Code:
1719 mysql     20   0 2799m 262m 5752 S  3.6  1.7  40:40.78 mysqld
32184 akilli    20   0  248m  18m 4352 R  2.6  0.1   0:00.18 httpd
28340 akilli    20   0  291m  61m 6880 R  2.3  0.4   0:07.09 httpd
28798 akilli    20   0  269m  40m 5360 R  2.3  0.3   0:05.80 httpd
28799 akilli    20   0  288m  59m 7216 R  2.3  0.4   0:05.59 httpd
29727 akilli    20   0  253m  24m 5184 R  2.3  0.2   0:04.26 httpd
30196 akilli    20   0  289m  58m 5904 R  2.3  0.4   0:03.14 httpd
31163 akilli    20   0  253m  24m 5128 R  2.3  0.2   0:01.62 httpd
31217 akilli    20   0  269m  41m 5340 R  2.3  0.3   0:01.68 httpd
31604 akilli    20   0  255m  25m 4748 R  2.3  0.2   0:00.60 httpd
13317 akilli    20   0  290m  62m 7248 R  1.9  0.4   0:39.48 httpd
13437 akilli    20   0  290m  61m 7248 R  1.9  0.4   0:38.99 httpd
17463 akilli    20   0  274m  44m 6140 R  1.9  0.3   0:30.72 httpd
22688 akilli    20   0  290m  61m 7216 R  1.9  0.4   0:22.16 httpd
22968 akilli    20   0  289m  60m 7228 R  1.9  0.4   0:20.91 httpd
25823 akilli    20   0  290m  59m 6032 R  1.9  0.4   0:13.45 httpd
26040 akilli    20   0  291m  61m 6128 R  1.9  0.4   0:12.76 httpd
26059 akilli    20   0  269m  40m 5368 R  1.9  0.3   0:12.09 httpd
26060 akilli    20   0  290m  60m 7288 R  1.9  0.4   0:12.06 httpd
26212 akilli    20   0  269m  40m 5368 R  1.9  0.3   0:11.23 httpd
26213 akilli    20   0  276m  47m 6052 R  1.9  0.3   0:11.29 httpd
26223 akilli    20   0  291m  61m 5980 R  1.9  0.4   0:11.96 httpd
26225 akilli    20   0  288m  60m 7276 R  1.9  0.4   0:11.13 httpd
26267 akilli    20   0  289m  58m 6080 R  1.9  0.4   0:11.15 httpd
26270 akilli    20   0  287m  58m 7176 R  1.9  0.4   0:10.82 httpd
26280 akilli    20   0  287m  58m 7316 R  1.9  0.4   0:11.23 httpd
26287 akilli    20   0  290m  59m 6040 R  1.9  0.4   0:11.45 httpd
26288 akilli    20   0  288m  58m 6896 R  1.9  0.4   0:11.92 httpd
26768 akilli    20   0  290m  58m 5656 R  1.9  0.4   0:10.74 httpd
26806 akilli    20   0  289m  58m 5900 R  1.9  0.4   0:10.63 httpd
27237 akilli    20   0  290m  59m 5948 R  1.9  0.4   0:09.58 httpd
27264 akilli    20   0  290m  61m 7136 R  1.9  0.4   0:09.85 httpd
27270 akilli    20   0  269m  41m 5460 R  1.9  0.3   0:09.14 httpd
27273 akilli    20   0  290m  59m 5832 R  1.9  0.4   0:09.89 httpd
27276 akilli    20   0  289m  58m 5980 R  1.9  0.4   0:09.93 httpd
27281 akilli    20   0  289m  59m 7272 R  1.9  0.4   0:09.26 httpd
27366 akilli    20   0  195m  57m 5004 R  1.9  0.4   0:09.60 httpd
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,853
Location
GMT +7.00
Try and see. I would not expect the issue be solved only after changing a web-server. An investigation is required.
 

ayberk

Verified User
Joined
Apr 18, 2016
Messages
33
How can i switch to the NGIX? I will then give you some new reports.
 
Top