Multiple HTTPD in the Process List
Check processes list
You can use any of below methods
- Using 'Top' command then press on 'O' , 'x' and 'Enter'
- ps aux | grep -i httpd
- ps aux |grep http| wc -l
- If you are running HTTPD preform then this can be normal
- To check if you are running preform run below command
- apachectl -l
Why more than one HTTPD in the list?
The main reason for seeing more than one Apache HTTPD running is that Apache is using forked processes to handle requests.
How to fix this ?
First let us agree on that this is not an error, if you believe this is eating more of your SWAP memory or causing any issues then you need to consider any of below steps:
- Optimize your application and find if it's using more requests than usual.
- Add more web-servers and run a load balancer.
- Add more resources (CPU, Memory) to your current web server.
- Add caching.
- Check the Minimum and Maximum Spare Servers and consider optimizing them
- cat /etc/httpd/conf/httpd.conf | grep -i MinSpareServers
- cat /etc/httpd/conf/httpd.conf | grep -i MaxSpareServers
- Consider reduce the number of seconds of the 'Timeout' inside the httpd.conf