3

So there is a VPS with openvz virtualization, with debian 6.0 32 bit The problem is appearing approx. 1 week ago. The automatic security monitoring system is shutting down the vps that i'm running due to cpu overload! I am linking the /etc/apache2/apache2.conf

If you could help somehow without access then thank's in advance! If you need more files then please ask and i will try to post them!

rsz
  • 143
  • 6
  • show us output of `netstat -patn` while high CPU usage will be observed. Also a `top` output would be useful. Are you using X of some sort? like gnome or KDE or is it only console accessed server? What kind of hardware do you have? CPU / RAM – mnmnc Aug 23 '12 at 16:04
  • it is only console access 1 vcpu 2GHZ 2GB RAM 25GB SSD – rsz Aug 23 '12 at 16:09
  • ok. if you type in the console `top` you will see column `CPU%` it will show you the usage percentage per process that particular process is using. show us top 10 or top 15 of those processes. – mnmnc Aug 23 '12 at 16:14
  • okay i am waiting until the cpu is on 100% – rsz Aug 23 '12 at 16:21
  • 80 will be totaly enough. – mnmnc Aug 23 '12 at 16:22
  • [top output](http://pastebin.com/Cq5a2US5) [netstat -patn output](http://pastebin.com/4Q1dzeUW) UPDATE> [htop output](http://pastebin.com/0NAJwke7) UPDATE2: [another top output](http://pastebin.com/5FEbYg3v) – rsz Aug 23 '12 at 16:39
  • Well, no mystery there. you need to limit the number of clients in apache config and number of threads. I would cut it by two and see if it will work stable. you have currently: `ThreadLimit 64` `MaxClients 80` – mnmnc Aug 23 '12 at 16:46
  • @rsz This was bumped to home page by the system.... Did you see the answer on this post already? Did it help? Don't forget to tick the gray check mark to the upper left of the answer which does help resolve to turn it green and to indicate that is the answer that helped you the most for your question. Otherwise, consider letting people know the status of this question and what further may be needed, etc. – Vomit IT - Chunky Mess Style Nov 30 '19 at 03:33
  • @PimpJuiceIT hey, Well, this was a very long time ago. I can't remember what the solution was or if I found it in these answers. I can't accept an answer in good belief because it may be misleading. I am usually accepting answers that helped me or pointed me in the right direction. Thanks for the notice :) What do you suggest as next steps for this question? – rsz Dec 02 '19 at 18:46
  • In this case based on the feedback, I'm not sure. Maybe just leave it as-is or ask a mod or someone else. I just wanted to be sure you didn't miss it I suppose. – Vomit IT - Chunky Mess Style Dec 02 '19 at 18:57

1 Answers1

0

Change the config by limiting possible clients and threads:

ThreadLimit          40
MaxClients           40

If it will help - OK. If not - cut it more.

I can see in netstat output that a lot of connections are originated from one IP address. This might mean that your site is poorly constructed - for example lots of iframes - each one of them will generate a thread on your side. You might want to redesign the site. Also check how big is your site and if you got a lot of pictures in hight definition and so on... Think about free cloud cache services like cloudflare.com it might free your CPU a bit.

mnmnc
  • 4,011
  • 1
  • 20
  • 24