Recently got a new dedicated server and I have a vague memory of having this problem with a server in the past, but I don't remember what was causing it. The http access turns extremely slow from time to time, making webpages next to inaccessible (though once you got access to a page it tends to load pretty quick). At the same time email, ftp etc. works just fine. Has to be some setting that's wrong. Edit: And server is not overloaded at all, far from it. CPU is fine and network connection and bandwidth use is well within limits. Thanks for any tips!
Tough one. Here's what I would check in the way of diagnostics: >top (that'll give you a page of processes, showing which ones are consuming the most resources. See if anything looks like it's hogging resources) >ps aux (that shows you all processess that are running. Make sure you know what they all are) >df (shows you your disk space, make sure nothing's full up.) Also, hit other websites hosted on the same machine, or from the same block. Are they slow? that tells you if it's site specific, server specific, or further upstream perhaps at your IP. I'd guess that it's likely one of a couple of things: - something is hammering your server externally. Could be a spammer, or could be a spider. - you've got some process that's running that is hogging resources. Maybe a cron job, or maybe just a funky mysql call. Or it could be something like a process is doing a name lookup or something, not finding it, and you're sitting there waiting for the process to time out. - If it's only the web stuff, and in fact everything else is running fine, then it could be something like your firewall, or something upstream of you (like your ISP's firewall).
If thats happening with httpd only then you are most likely maxing your apache's max connections limit. Adjust it. If it doesnt help and you still get maxed then it can be a httpd DDoS attack