Page 1 of 1

How to manage server loads caused by 1 website.

Posted: Sat Jan 14, 2017 8:34 am
by vikhyat
Almost 90% of my clients use Wordpress and the biggest problem is the load caused by it. Many clients install multiple heavy plugins and themes and do heavy activity with it. Recently, a client did something really heavy with wordpress and the whole database server went down and the server load had reached more than 5.87.

Here are the limits I have set in php.ini


max_execution_time - 60
max_input_time - 60
memory_limit - 64m
post_max_size - 128m
upload_max_filesize - 128m

Re: How to manage server loads caused by 1 website.

Posted: Sat Jan 14, 2017 11:48 am
by mehargags
First,
Always mention your Server Specs / OS. No one can help you without this basic infor

Second,
Put each wordpress site in its own individual VestaCP User to isolate it from other sites (basedir)

Third,
Monitor your Exim MTA if your mailq is over 100s/1000s

Code: Select all

watch exim -bpc
Fourth,
There isn't a straight up way to detect problematic domain other than doing routine audits and keeping track of which domain might be causing load/spam etc. Just imposing limits is not a solution outright... Keeping a watch on processes is the way

Re: How to manage server loads caused by 1 website.

Posted: Sat Jan 14, 2017 5:50 pm
by vikhyat
My server specs:
2 GB RAM
2 Core processor
2x150GB SSD
Network speed - 800Mbits

I have 8 websites hosted on this server.

cPanel has a RAM and CPU limit utility which doesn't allow a website to use more than the speciefied ram/cpu so I wanna know how I can do the same on my server too because I don't want to ruin the entire server just because of 1 website.

Re: How to manage server loads caused by 1 website.

Posted: Sat Jan 14, 2017 6:47 pm
by mehargags
VestaCP Doesn't have any such "out of the box" Limit control. However you can install CPUHulk and configure it for the same... this is what CPanel uses.

8 Wordpress sites, that too "uncontrolled" by you, a 2GB RAM VPS looks to be underweight. You should have atleast a 4GB KVM VPS to have enough room for CPU spikes and problems arising from user's noobish actions, atleast until you can learn the fine grain control over processes.

Re: How to manage server loads caused by 1 website.

Posted: Sat Jan 14, 2017 7:28 pm
by dpeca
mehargags wrote:Put each wordpress site in its own individual VestaCP User to isolate it from other sites (basedir)
by the way, each site has its own basedir that is limited only for that site (/home/user/web/site.com/public_html), not for /home/user/
so, from that point, each site is isolated, even all sites are under the same user.

of course, the same FTP account is a security problem, again :)

Re: How to manage server loads caused by 1 website.

Posted: Mon Jan 16, 2017 9:37 am
by LouisUK
Have you optimized MySQL?

I also host 8 WordPress and 2 static websites. One site has always caused problems ever since the client installed a eBay lite plugin which is query heavy. I followed a few guides online and also used MySQLTuner for value recommendations, a cache plugin also helped.

Re: How to manage server loads caused by 1 website.

Posted: Wed Mar 29, 2017 1:43 pm
by skurudo
LouisUK wrote:Have you optimized MySQL?
There is two tool for mysql tuning:
viewtopic.php?f=14&t=14148