Help - Search - Members - Calendar
Full Version: My Suggestions
Hostony Board > General Support > Suggestions
jstitham
When I first came to Hostony, everything ran great and I enjoyed the experience. I even told my friends to come here. Lately however within the past few weeks there have been many problems with cpu load and slowdown of sites. The server just failing period, and other issues that have just left me bewildered.

My biggest suggestion is that admins post something here immediately when something happens. The first place I come to is the forums to be sure I am not the only one with the problem. But there is never anything here to explain what is going on.

We shouldn't have to post problems to get info on what is going on. Sure, we can write support tickets, but until they get answered we are sitting i the dark. If you are able to log into cpanel and see that things are in failed mode, you get scared half to death that you have lost valuable data. You can't bachk up your site evry five minutes and you sure can't do it when you can't even connect to it.

I have also seen in this forum several times people referred to as bad users. Usually this occurs on sites that generate a large amount of SQL queries. Now, if a site is popular and runs on an sql database, then wouldn't that draw the large amount of sql queries, and does that make that operator a bad user? This concerns me because I use and sql database and hope to get popular one day. Will I then be one of those 'bad users'? I need to know this because if I'm going to have problems down the road because of this, I may need to seek a host that doesn't mind my site. and I would have never gone to a site generated by an sql database idf I thought it was going to lead to trouble. Hostony itself offers php nuke in its built in scripts. So I would like to have defined what makes a bad user. Almost everything I do relies on sql databases.

Aside from the technical issues of why server load is high and failures occur, those are my main concerns. Now aren't you glad you asked smile.gif
Serge
First of all it is impossible to tell immediately what happens in case overload occurs.
When we login to the server just after we see the alert we’ll see processes that stuck and these processes will belong to most active sites on the server, but in 90% they are not those who created overload. It is because when system is overloaded processes are put in the queue and it is quite natural that we’ll see processes of the most active sites in the queue though the source of the problem could be a site with couple visitors a day but with very bad written script.

That’s why we cannot be fast and need time to monitor the server. It may take from several hours to several days to locate the person that really creates problems.

I understand that all our customers want to know the source of the problem immediately but it is not possible for us to indicate the problem so fast and to the top admin should take actions to prevent server from going down because of the overload. To do so he should put apache offline for about 1 minute to allow processes in the queue to run through CPU. When you see that apache failed it means that admin have put it offline to let load go out. Apache will restart automatically each minute if it is not running.

As for the valuable data. We have weekly offsite backups that are downloaded to other datacenter located in Houston, TX. Also we do daily backups of the configuration files and MySQL databases that are also downloaded to offsite location. The only thing we may need to use backups when HDD is damaged or server is hacked and hard rive is vanished. Otherwise when server went down just because of the overload the data will be there when server will go up.

For last 3 days we have a tech dedicated to monitoring load and services on the server and so far number of problems on the servers decreased. Though he’ll need to continue monitoring servers for about a week to ensure that all problems are gone, because overload can be created by cron jobs, etc.

Now about bad users. Bad user is not the person that uses MySQL or apache much. We have user that safely uses databases over 1 Gb in size because his queries are well optimized and web pages are pre-generated in html by their custom software. When their visitor visits the site he loads pre-generated page creating no load on mysql and the lowest possible load on web server. So with database that is over 1 Gb in size and about 4K hits a day they create no problems.

Recently we had another user that was killing server just with one query run by phpBB software. phpBB is not too bad script itself though invisionboard is much better. He decided to alter phpBB and made an error as a result web server process used all the memory available on the server and was killing the server each time somebody tried to access his forums.

If you know what you are doing you can be popular but not create any problems to other users on the shared hosting server, thus keeping your web hosting budget low.

Common MySQL problems:
1. Locking MySQL tables for update and not unlocking it at the end of the script or in case of the query failure. It leads to consuming all connections on the server in 10-15 minutes.
We suspended 1 site yesterday and 1 today on server 10 and server 11 because of this problem.

2. Copying to the temp table is #2. Many users like to write several queries to get data they need. In the middle of the process they create numerous temporary tables copying data from main tables to those temporary tables and creating high load on MySQL and HDD.
You have to always remember that any operations that write to the HDD consumes much more server resources that select operation and should avoid extensive write operations and data copying by reorganizing your data and queries.


We don’t mind to unsuspend those users once they fix their scripts, but they should be careful in future.

For 2+ years we are in hosting business I saw only 3 people that overloaded servers with well written scripts just because of being too much popular. All of them upgraded to the dedicated just because the amount of $$ they generated with their sites allowed for
paying dedicated server fees.

One was a vBulleting forum with 100.000+ members and now is hosted on 2 Dual Xeons. Another was an online news site with 15K daily visitors and the last one was an ad serving system serving 7000000 banners a day.

I can say that any site can be optimized to serve 5-10K daily visitors on the shared account without creating load problems.
TGecho
Thanks for that great information Serge. Of course now I'm even more nervous about taking my scripts online as I'm still just learning. At least I use a local testing server. Every once in a while I manage to grind that to a halt! (usually a stupid syntax error)

I guess it comes down to testing and practice. Test your scripts and learn how to optimize them properly.
Serge
Just try to buy a good book about extreme programming technology.

The main idea is first to develop a test cases and only after that to write a code. Using such a practice you eliminate about 90% of the errors that occur when you alter a code because after each change you'd be able to run code through testes and find where errors occur.

Also don't forget about load. Under load many software behaves in different way then a single process.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here