Website down? Watch your Scripts
April 8th, 2011 by admin
If you have a nice website with many scripts running and you often feel sluggishness in loading of pages or worst the whole website does down from time to time, it’s not always a sign of bad webhost. Work with clients I have received complaints about website going down and when digging into the matter it was found that number of process were a lot more than what were allotted by the hosting to that particular account. To avoid misuse and proper distribution of resources amongst its customers, shared hosting providers sometimes allot a fix number of allowed simultaneous process than can run in one account. Now when number of process exceed the maximum allowed, your website will go down and resume again itself when process decrease. To understand this, let’s assume these processes to be similar to the process running in your windows based home PC. You should have noticed that when number of process increase in your taskmanager, your computer responds slower. Web servers are computer too, so when your website start running lots of processes it gives substantial load on the system making your website responds slower. In normal conditions chances of increasing process count is very less likely but when your website have several scripts that have several loop holes, it can result in increase in number of process. One of the most common culprit is the newsletter system, it require many mails to be sent and if it is abused by spammers then you know you are in trouble.
- Firstly you should be aware of what types and how many scripts are included in every pages of your website. Use good quality scripts and avoid alphas and betas.
- Remove any unnecessary script that many be included on many pages of your website, like script for embedding flash content and page may not have any flash content at all. Keep watch on those heavy frameworks scripts too!
- If you use mailing script for sending mass emails to your users, make sure you have some delay while sending mails. Sending 1000 emails at once is a big no but sending 1000 emails with gap of 30 seconds after every 10 emails is ok.




