Big problem with shared hosting

GamesCreation

New member
I think a big problem there is with shared hosting is that if you or anyone else on that server does anything wrong, it can cause problems for everyone.

For example, a badly written php script that gets stuck into an infinite loop can bring a server down for about a day. I know this because unfortunately it happened to me, when I was trying out a portal that looked good, its random picture script got stuck into an infinite loop because it didnt like one of the filenames that had a capitalised extension. It brought the server down for a day, but what was worse was I didnt know it was me, and it was hard for the host to track it as well as you cant access any of the sites when it happens. Although this was when I was hosted by a reseller, and they didnt have access to the server fully to resrart, diagnose etc.

But I think a consideration you have to make is one mistake by anyone there, and it can cost you a lot of business if you run a business oriented website. And with servers getting bigger and faster, there are more pepole being put on them, and more things to go wrong.

These are just my views though, a host or other people may have other views, which I would be interested in hearing.
 
This can be a big problem for in-experienced hosts and many of us have expereinced this problem one time or another. There are several steps however to help stop these problems from starting.

I run a few cronjob scripts that go through a find users/processes that are using a lot of system resources... if they are over a limit I set, the process gets killed and the users request will just get an error and not bring the whole box down.

The second step i took was tweaking out a few MySQL settings monitoring connections/system usage and a few other things that my friend setup for me.

The best way to protect your self is to know your system, know what your users are doing, and to know how to set preventative measures to help reduce the risk of these types of situations starting.
 
Is there anything, that you as a user, can do to stop it happening? I test all my scripts locally first, but I only have Windows, and some react differently on linux in different conditions
 
Well we havent come into a situation like this...but we check logs frequently and contact our customers should we feel the risk of something like this happening.
 
Has something like that ever started to happen ( as cript taking up too much cpu usage, memory etc) but you managed to stop it in time?
 
CGI scripts can cause huge problems with the server by using a lot of resources but most shared hosts dont allow CGI scripts now because of this.

I normally only use scripts which are small that I can test myself on a local machine, or that are big and have a large backing of people already running them, just to make sure that it doesnt cause any problems.

You can always use a cron job to check for any scripts you know that cause problems and as Jonathan said, use a cron job to check if any are using a lot of server resources
 
CGI stands for "common gateway interface" that allows a webpage to communicate with a server side script and Perl is the language which you code to use for your script :)
 
Wow John, I think that is the best definition I have heard for CGI/Perl. Easily readable and understandable. I probably would of rambled on for a bit. Nice work
 
I dont think there is any difference at all.
You could rename a CGI file as file.anyext and the webserver should still recognise its CGI/Perl :)
Just have the server set to parse the perl/CGI scripts :)
Hehe thanks Jonathan ;)
 
Bad codes bringing down the whole server is one of the worst problems host could face... few simple steps to reduce the effects are:

1. Regularly check logs
2. Keeping close and regular eye on bandwidth flow could help you detecting problem before it occurs (mostly by popular sites)
3. Keep record of any site causing trouble for future?
4. Better check previous site caused trouble before spending any time investigating or finding new site/s
5. We use some in house tools to check bad codes (especially asp codes), which rename the web page with bad or incomplete codes.
6. Shut down the site immediately... and then contact client with request to correct his/her codes and test them thoroughly before uploading on server.
7. Leave the site off until codes are changed, which will discourage user to upload pages without testing codes properly.
8. It is wise to keep records of bad codes and necessary corrections, which could be as a knowledge base or dos and don’ts.
 
Yep, happened to one of my customers servers about a month ago. Good old apache error logs showed me the files and removing it fixed everything
 
John Diver said:
I dont think there is any difference at all.
You could rename a CGI file as file.anyext and the webserver should still recognise its CGI/Perl :)
Just have the server set to parse the perl/CGI scripts :)
Hehe thanks Jonathan ;)

Alright, whats the difference between CGi and Perl?
 
Well you got ripped off because:

You have

PHP_SAFE MODE OFF
PHP_suExec OFF
php open_basedir not Enabled

Check that... and Secure your Server...

Cheers:D
 
Top