1
My apache starts to slow down from nothing, 5 minutes after I turn it on and the users start to access the site and apache starts to slow down, I used the TOP command in centos to see the processes and the result is this below (not pasted everything if it would not get too big):
PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
7461 mysql     20   0 2664688 266500   7240 S   6.8  3.3   1:55.17 mysqld
14200 apache    20   0  607620  17904   4372 R   2.5  0.2   0:13.45 httpd
14398 apache    20   0  607488  17900   4344 R   2.5  0.2   0:12.49 httpd
13806 apache    20   0  607908  19852   5980 R   2.2  0.2   0:19.31 httpd
13808 apache    20   0  607948  18408   4536 R   2.2  0.2   0:17.65 httpd
13847 apache    20   0  607488  17940   4400 R   2.2  0.2   0:16.45 httpd
13994 apache    20   0  607488  17888   4300 R   2.2  0.2   0:14.08 httpd
14019 apache    20   0  607488  17888   4312 R   2.2  0.2   0:13.89 httpd
14035 apache    20   0  607620  17900   4304 R   2.2  0.2   0:13.69 httpd
14037 apache    20   0  607488  17892   4332 R   2.2  0.2   0:13.37 httpd
14054 apache    20   0  607488  17892   4316 R   2.2  0.2   0:13.35 httpd
14073 apache    20   0  607572  17900   4316 R   2.2  0.2   0:13.41 httpd
14106 apache    20   0  607488  17928   4352 R   2.2  0.2   0:13.28 httpd
14180 apache    20   0  607488  17896   4320 R   2.2  0.2   0:13.05 httpd
14212 apache    20   0  607832  18228   4516 R   2.2  0.2   0:13.27 httpd
Is there any way to stop him from being so slow? the configuration of my server is:
Centos 7 8GB of Memory 4 vCPUs
I already put 256MB, 1GB in memory_limit and also did nothing. also put the following configurations in apache httpd and also did not help anything:
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 500
HostnameLookups Off
My server averages 5,000 hits an hour. someone could help me with this?
I’ll try to use Nginx to see if it works, thank you.
– Marcos