I had a VPS server that got rooted before so I moved to a new VPS. Right now I am having an issue with mysql and apache.
I am not sure if its a configuration issue or got hacked again. The issue is that when both are started they both use 100% of CPU and in turn the site becomes inaccessible and I am not able to login via ssh. The site becomes inaccessible 10-20 mins from startup. The only way to do so is to boot the server and immediately ssh before they kick in.
From the error logs of Magento I get mysql is inaccessible. How do I start about figuring out this issue. Maybe see what is using apache besides my site or what specific files are making most of the calls?
I am also using memcache and APC.
EDIT: after looking at top I see 20-25 httpd processes that are consuming 300%+ CPU power.
EDIT 2: Thank you guys for your responses. After checking the logs as suggested and lowering the max # apache processes it seems the site is performing slightly better. The main reason though was that bots are still hammering the site but are now redirected via .htaccess to an empty text file. How can I stop these bots? I know a firewall is probably the best route but i do not have a hardware firewall. Any suggestions is greatly appreciated.
Thank you again.
[link][10 comments]