Portal Home > Knowledgebase > Articles Database > many sleeping httpd connections
many sleeping httpd connections
Posted by mr-cracker, 07-29-2012, 06:39 PM |
Hello,
i have a downloading website so its normal to initiate many httpd connections but the thing is they are not terminating, they still remain in sleeping mod which is killing my server resources. i'm not sure if its configuration problem or its scripting issue
here is top results
top - 20:55:36 up 4 days, 13:41, 1 user, load average: 1.99, 5.73, 10.47
Tasks: 2207 total, 5 running, 2202 sleeping, 0 stopped, 0 zombie
Cpu(s): 24.1%us, 1.5%sy, 0.0%ni, 73.3%id, 0.0%wa, 0.0%hi, 1.1%si, 0.0%st
Mem: 4045976k total, 4000712k used, 45264k free, 1448k buffers
Swap: 8385920k total, 2353584k used, 6032336k free, 30336k cached
there are over 2000 sleeping httpd connections, how can i get rid of them??
i'm using dedicated, linux, directadmin, centos and i'm using php and curl
does anyone has any idea?
|
Posted by SA-ChrisM, 07-29-2012, 06:52 PM |
Lower timeout and Keepalive (if enabled), restart apache and see how it goes.
|
Posted by mr-cracker, 07-29-2012, 06:59 PM |
please tell me where can i find those, and you mean keepalive in http headers??
|
Posted by mr-cracker, 07-29-2012, 11:08 PM |
after this time i think this is an attack there is one ip with over 1900 open connections, how can i ban it from ssh
|
Posted by kevincheri, 07-30-2012, 04:43 AM |
Don't you have a firewall on your server? If yes then you should be tuning it for better performance. If you still don't have a firewall installed, go for CSF. You will need to tweak the values for better security and protection.
Worth looking at below url
http://configserver.com/free/csf/readme.txt
Adjust CT_Limit to a resonable value (300) and see how it helps.
|
Posted by TravisT-[SSS], 07-30-2012, 01:30 PM |
What is your httpd.conf file?
What does the following show?
|
Add to Favourites Print this Article
Also Read