Knowledgebase

problems with KnownHost Managed VPS - high CPU and a notice of removing us from hosting

Posted by arditi, 04-08-2016, 08:52 AM
I have problems with KnownHost Managed VPS-2 - 16CPU - 2.25GB RAM The real problem is that sometimes their VPS consumes too much CPU, im hosting a Wordpress site and has 400 users online / 42k per day. When CPU goes high at random times there aren't many users visiting the site and a mysql crashes, i checked performance with htop , CPU and RAM go near 100%, apache is eating almost everything, too many child processes. Still they say: "you need to upgrade RAM and CPU" , i don't know why a site of 42k/day views or 1.6M/month views has this kind of problem. The client wanted KnownHost, i have other sites hosted in futurehosting.com with VPS and they run perfectly with more than 3M/month views, sites with Wordpress and Prestashop. After many times exchanging messaging with KnownHost they replied with a notice: We would not be able to continue your hosting on a VPS package I don't know about others but my performance is

Posted by DanielP, 04-08-2016, 08:57 AM
@arditi If you have a ticket number to reference I'll gladly review over this, however, it's quite possible for a WordPress install with 400 active users online depending on the plugins, themes and optimizations to easily consume more resources than a VPS-2 would provide. If you can provide me with a ticket # I'll make sure one of our senior admins reviews over the case to ensure there is nothing else that can be done in this regard.

Posted by TheLex, 04-08-2016, 08:58 AM
What is your OS that you are using ?

Posted by Andei, 04-08-2016, 08:59 AM
1. It's not 16 CPU, it's an equal share of 16 CPU, which means you split that CPU power with other clients on the node. 2. 42k users per day wordpress site has no place being hosted on regular HDD with 2.25GB RAM, you need to upgrade to pure SSD, more RAM and more CPU power 3. I'd also suggest replacing apache, mysql, with something like nginx, mariadb, with varnish on top. 4. You've answered your problem yourself: "CPU and RAM go near 100%, apache is eating almost everything, too many child processes."

Posted by arditi, 04-08-2016, 09:13 AM
Screenshot of HTOP, also CPU/RAM overloads only sometimes, and not this time

Posted by arditi, 04-08-2016, 09:27 AM
I received a reply from KnownHost with a ridiculous solution: move from VPS-2 ($35/month) to KH-DS3 ($329/month) or KH-DS4 ($379/month)

Posted by DanielP, 04-08-2016, 09:32 AM
@arditi First off, your package is not on a VPS-2 it's on a VPS-4 as I've just located your ticket. Secondly, your website was consuming close to half of the resources of one of our nodes when we contacted you. The CPU usage your website needs due to the facebook promotions that you are running is quite large and would cripple a smaller server, we aren't going to recommend a dedicated server to you that will not function and simply die when your website receives another large traffic burst.

Posted by Savio13, 04-08-2016, 09:34 AM
Looks like you need to make a decision, there is no way a 2-3GB vm will handle that sort of usage.

Posted by arditi, 04-08-2016, 09:47 AM
I was misinformed about the VPS-2. Sorry about that. It seems my client is paying $60/month with just a wordpress website, and now KnownHost wants the client to upgrade the plan to $3xx/month. Anyway i don't see any reason why visitors coming from Facebook referrals could cripple the server, they are just visitors from other links. Thanks for locating us, as it seems you want to work hard and solve a problem from an anonymous user (not anymore anyway). If you can't manage a VPS server with $60/month and keep complaining about consuming close to half of the resource of your nodes than you should consider not making a package available with that price or hardware specs. Also lets get to the primary question: Why give a notice of removing us from hosting?

Posted by net, 04-08-2016, 09:51 AM
Pretty clear to me. Better move on and get a dedicated server if you want to use real dedicated CPU.

Posted by DanielP, 04-08-2016, 09:56 AM
@arditi In simple terms the VPS is not being used within our terms. It is consuming far too much in the ways of CPU resources when you receive heavy spikes in traffic for extended periods of time. We are not talking about short bursts which are allowed, but we are talking about 12~ hour chunks where your VPS was consuming almost as much CPU resources as is included with our KH-DS3 package. This has nothing to do with managing a VPS server. You've been informed that this VPS is abusing the services provided to it and we have provided you options to handle the website traffic and load. You also have the option of optimizing your website code and reducing the overall cpu consumption during these periods as well which would not require you to upgrade. In regards to your primary question, if a service is violating our terms then it either needs to be brought back into compliance with our terms of service or removed.

Posted by arditi, 04-08-2016, 10:13 AM
Just to be clear our bandwidth hardly reaches 3TB/month so in traffic there isn't any violation since the package gives us 11TB, also i would like a link of the Terms where i can find that consumption of the resources you have bought might be considered as an act of violation and that might suspend my account.

Posted by DanielP, 04-08-2016, 10:15 AM
@arditi This can be found under our "Resource Usage" section of our acceptable usage policy located here: https://www.knownhost.com/acceptable-use-policy.html

Posted by WPCYCLE, 04-08-2016, 11:29 AM
Seen to many cases where the hosting package for a WordPress website needed to be upgraded to accommodate its usages...only to have it owner bounce from low cost host to low cost host, hoping to never pay more and bad mouth each host along the way. The classic "My site is down and I'm losing millions every hour!!!!", but yet can't afford an upgrade?!?!?!? But before we go down that road.... Has anyone involved in this; 1. optimize the site? 2. optimize the database? 3. suggest another option than Apache? 4. check that the site is not being attacked in any form? 5. are there any security practices in place? Sometimes going through those steps first can drastically help eliminate whatever issues are happening before doing an upgrade or host move. Reading is fundamental.

Posted by arditi, 04-08-2016, 12:35 PM
Thanks for pointing out some things that i didn't mention. I will be happy to answer: 1. What OS are we using? Centos 6.7 2. Optimizing site? done, also using cloudFlare for DNS 3. Optimizing DB? done and mysqloptimized+mysqltuner 4. Checked for DDOS attack and firewall rules 5. Security practice? not checked yet Security and attacks are protected by KnownHost, if we are talking about the OS and its software, not the website itself. We can't afford upgrade because the country where the visitors come from is poor, so no big investments are made from advertisers. And im not "bad mouthing" anyone or any company, just telling the truth of whats behind the scenes, for example in this particular situation its the Terms about Resources consumption (public or not, those terms are not explained inside the advertisements of hosting companies so anyone can take the bait).

Posted by oldgrunt, 04-08-2016, 12:57 PM
I have yet to see any major host that doesn't have TOS,AUP, etc links at the bottom of their pages. All favor the host, but some are more restrictive than others. I have read some that made me run, some made me sigh, most are pretty standard.

Posted by XTremo, 04-08-2016, 01:13 PM
So you're getting 1.6 million hits a month, but not making enough money to cover the hosting resources that it requires? That's your problem right there......failure to put in an adequate revenue stream when you were on the way up. It's not Knownhost's problem.....it's yours. Everybody would like to get a lot of hits and views......but you need to make sure you've got the money to sustain the growth of the infrastructure that you're going to need.

Posted by WPCYCLE, 04-08-2016, 01:46 PM
You're Welcme. Which I'm guessing cPanel is in there as well. Those two elements alone use about 1GB of your memory before anyone visits the site. VPS security and WordPress security are two completely different things. A server or VPS can be rock solid with security and an unprotected WordPress website can be torn apart, exploited, and all sorts of other "fun" things can happen to it....even if the core is updated. One small hole in the theme or a plugin can cause all sorts of issues that can attribute to load issues. Plus even if the themes and plugins and solid...there's all forms of attacks that will also cause load issues. Do you have any WordPress security plugins installed? If no...try WordFence and disable the live view options. It's a starts because a plugin for security is a few steps too late. Also, communicate with Knowhost about the logs for your account. Have them point out anything in the logs that can attribute to the load. If it is due to traffic, then your investors need to compensate for this as mentioned above. Some form of income to cover your costs.

Posted by wswd, 04-08-2016, 03:20 PM
Bandwidth??? Nobody ever said a word about bandwidth. It's your CPU and RAM that is causing the issues, as you were already told.

Posted by max_payne, 04-08-2016, 04:42 PM
The OP is expecting their hosting company to magically lower their RAM and CPU. Unreal. Have you tried normal WordPress troubleshooting steps such as temporarily using a different theme or try disabling all plugins and enabling them one by one? The fact remains, your server is bursting CPU caused by apache. It is YOU who has to try changes at the application level to see if those numbers can be lowered. Your hosting company can not do this for you.

Posted by abrakatabra83, 04-08-2016, 10:10 PM
Ardit, përshëndetje! I have reviewed the specs of your plan and it seems to me that this website should not be on this kind of setup. CPU/RAM limitations are the #1 "fair use" limitation that exists on every server. I've never heared of a host complaining about overuse of disk space or bandwidth. But i've heared plenty complaining for CPU/RAM overuse. It seems you have no experience in this kind of thing and therefore you thought server resources was not a real thing. I remember i felt pretty much the same way like 10 years ago when ResellerZoom back then blocked my entire reseller account including everything in it because of a single cPanel account that had a small forum which was causing resource overuse. They brought down every one of my websites, even the innocent ones. So i believe you are being treated very well by KnownHost to be honest. Maybe you should try a KVM/Xen/whatever VPS with dedicated CPU and RAM. Or a cloud solution (it can get more expensive). Get 2 dedicated cores or something and see how it goes. Furthermore, i'd add that Albania is poor but not that poor to not be able to afford paying for your VPS with 45k visitors a day. And lastly, i will just go ahead and say it: Why is this website still on WordPress? CMS like WordPress are generic solutions for cheap, quick websites and startups. They are not for big established websites. I suggest you move to a custom solution.

Posted by WPCYCLE, 04-09-2016, 12:38 AM
That statement may have been valid 10 years ago, but a there's a good percentage of corporations that now use WordPress. In Canada, one of the largest media companies (major TV and Radio stations) changed all the websites associated to them to WordPress. In terms of big and established...according to Wiki, they're worth $2.159 billion. If a company at that level isn't seeking a custom solution, then why re-invent the wheel.

Posted by max_payne, 04-09-2016, 06:47 AM
There are obviously pros and cons to everything including using a custom built site vs using a CMS. CMS are a nightmare at a security standpoint. They are routinely the target of botnet attacks and unless you have provisions in place to protect yourself, you can find yourself in trouble. The downside of custom sites is what happened with walmart.com. Apparently this is a custom built site and the lead developer quit. Since then, no one has been able to figure out how to work the site to a point where it has had no major design changes in years.

Posted by abrakatabra83, 04-09-2016, 08:05 AM
So custom websites are reinventing the wheel? And just because one company is doing this it does not mean it's a norm or even a good practice. Just because you're rich doesn't mean you are the smartest. Thanks for bringing this up. It's something that doesn't get much publicity. Bad developers often praise CMS for their "security" because they themselves have no clue how to secure a website so some basic security is better than no security so CMS is great. That's the logic but it's stupid. In the walmart case, big companies should have an in-house team of devs. If anyone leaves, the others can handle it. I believe this was more a case of dev team mismanagement than a problem with custom solutions.

Posted by WPCYCLE, 04-09-2016, 10:52 AM
This is one of those strange arguments where both of you are agreeing and disagreeing. I love working WordPress but I'm not one to ignore other methods. When I worked in music, there was the age old argument on what was better for music production....PC or MAC. That argument lead to cars flying over cliffs and world destruction. The technical side of the argument failed because both options allowed for import and exporting of audio files. The true test....does the regular non-musician person going to work listening to music in their car hear a difference...the answer....no. Ears cannot tell if it was made on a MAC or PC. You can create great and bad music on either systems. Max_payne said it best...developers that are no longer available. I've come across many situation where a developer quit, died, or was away on vacation and the site owner was stuck. The time it takes to figure out what the last person, it's quicker to blow it up and start over. Even in WordPress, as simple as it is, there are very bad developers that throw a bunch of things together to make it "work", but at least there's a better chance to find someone else who actually know WordPress properly and correct the issues. This is a media company that been around at least 100 years and owns almost all the TV and Radio stations in Canada....not a start-up of some rich person who woke up one day needing a website. 1. They had a custom site for many years prior. 2. They have an in-house team with experience The company has been online before WordPress was even created. Just for them to decide to use WordPress, decisions had to be passed through many hands (executive meetings, votes, hiring, testing, etc) including the web team that's been with them for many years. In this day, the website is the face of the company. At some point in meetings, a few people would have said this is what we need our website to do, and a few people would have replied that WordPress does all that. Ok...now let's analyze the pro and cons and ease of use the visitors. Plus, when I look up other television stations in other countries, a lot of them also use WordPress. I don't disagree with what you said here, but if I stay on track with your original statement, then you just contradicted your points with my response. If a company can afford good developers who actually know what they're doing, and want to avoid the situation Walmart was in, then why not use WordPress? What's sad...the developer was probably treated the same way they treat their employees. Security...everything is an issue with security. WordPress or not, all sites are attacked everyday. Essentially this is a no-win debate. If the company used a custom solution and loses someone or is exploited, then everyone will say why not use WordPress or a similar CMS...but if the company used WordPress and something happens, then everyone will say why not use a custom system.

Posted by smilemaker, 04-09-2016, 12:14 PM
OP if you are stressing for cash check out Digital Ocean. You may want to work on optimizing your site earnings so you may afford the hosting you require. Are you offsetting any of the load with CloudFlare?

Posted by arditi, 04-10-2016, 07:56 AM
Everyone thanks for the replies, i cant reply to each one so im replying everything here I can't argue with using a custom website, because it needs investment ### SOME CHECKS I have to admit that KnownHost have high-performance servers, but the server itself has 32-bit CentOS 6.7 and too many configurations including cpanel,whm,emails,bandwidth,iptables,firewall etc... I tried to identify the problem, most of it comes from too many slow queries that eat all the ram, also changed some timeouts on PHP and mysql it seems that the theme itself has a problem with generating too many wp_postmeta rows (2.1M), also there are old posts starting from 2013, a total of 150k posts I deleted some plugins that where inactive Updated from MYSQL 5.5 to MARIADB and recompiled APACHE 2.2 and ensured the usage of opcache for fast execution Also the server is using NGINX and APACHE as a HYBRID Before updating i did try to use W3 TOTAL CACHE and WP SUPER CACHE with no effect on slow queries using db cache #cleaned the db from unnecessary rows, such as post revisions and postmeta that where not being used #Optimized all DB every 2 hour with cron #Run #Output (modified, tips gathered from mysqltuner.pl) #Run #Output Established connections: 34 Total connections: 825 #Run #Output 8 [CloudFlare] 9 [CloudFlare] 9 [CloudFlare] 10 [CloudFlare] 10 [CloudFlare] 11 [CloudFlare] 16 [CloudFlare] 25 [CloudFlare] 26 [CloudFlare] 445 [LOCAL PUBLIC IP (not sure why)] #Run #Output Uptime: 9575 Threads: 4 Questions: 2844978 Slow queries: 0 Opens: 175 Flush tables: 1 Open tables: 238 Queries per second avg: 297.125 #MYSQL CHECK #Google Analytic's LIVE at the moment: 450 views #yesterday crash, all night was offline because db service was stopped, after optimizing it as my.cnf i described before it came alive again, it was eating 3.1GB ram from 3.75GB, after optimization of table size and innodb size , now has a total of 2.1GB of memory in which 1.8GB is virtual/cached #also the final problem identified from the slow query of wp_postmeta from yesterday crash, which took 15sec everytime was executed: SELECT DISTINCT meta_key FROM wp_postmeta WHERE meta_key NOT BETWEEN '_' AND '_z' HAVING meta_key NOT LIKE '\\_%' ORDER BY meta_key LIMIT 30; Right now it runs perfectly, no crash or anything, with 450 online users After 10minutes mysqladmin status has increased "Questions" and "Queries per second" , as you can compare from above results Uptime: 11147 Threads: 1 Questions: 3347650 Slow queries: 0 Opens: 175 Flush tables: 1 Open tables: 238 Queries per second avg: 300.318

Posted by WPCYCLE, 04-10-2016, 12:35 PM
You're Welcome So far you're heading in the right direction. One thing I would keep an eye on is innodb_buffer_pool_size. It can be set to a higher number closer that's closer to the actual size of your database.

Posted by veedub, 04-13-2016, 10:42 PM
Been a very long while since I posted on here, but I wanted to comment that If I was running a WP site with that kind of traffic. I wouldn't be on a forum upset, that puppy should be on a dedicated long before it hit 1 million plus users a month. I hope it gets worked out, I only found this doing research on Knownhost and who owns it, came to find the COO, further looking into him who i now know who finally, lead me here to an interesting thread lol. I've known of and used Knownhost for some time, using ownCloud with serverside encryption, it brings load averages up a bit and I would move to dedicated if i was taking away from others by essentially robbing a node of it's power for one site. You pay cheap price by sharing a server, have to play it fair and let others use the power. I'm surprised they didn't shut it down and force you to move. With that kind of traffic, i'm not sure how you're unable to obtain a decent dedicated anyway.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read


Language:

Client Login

Email

Password

Remember Me

Search