Categories
Articles

Lazaworx.com blackout

Sorry everyone for the site was down during the past two days. Here’s what happened.

Drawbacks of Shared hosting

Lazaworx.com is hosted on a shared hosting, in which hundreds of sites share the resources of the same physical hardware. Even though they advertise the service comes with unlimited bandwidth and storage, the real bottleneck is the CPU and memory usage, as I learned now. It’s nowhere advertised that once your site runs over the 2% CPU limit they will instantly suspend it.

What has happened?

In the last week I have had a high CPU usage warning when the automatic backup has started. Afterwards Lunarpages, my web host, has removed the rights (chowned) from the site’s main file, the so called index.php file. After I’ve removed some of the more processor-intensive tasks and turned off all plugins (e.g. social sharing) they have switched it back. They monitored the site, and by the stats it seemed it went back to the normal ~0.5% CPU load.
Then suddenly at 06:37(PT) 22 August came another CPU peak of 7% (possibly the backup kicked in again), after which the site has been suspended again. Reading a lot around the web I found another possible culprit, the so-called “cron jobs”, which are there to do maintenance tasks, like releasing scheduled posts, sending out notifications, etc. Unfortunately with WordPress these cron jobs can easily overpopulate, and eat up too much of the CPU. Just a second before the CPU peak came I found 15-20 cron jobs started in the site’s access log. I had to move this task from WordPress to the server, and restricted to run only twice a day. Also made some more minor adjustments others suggested in the forums. So far so good.

The “Support case”

After I’ve notified the staff of the changes and asked them to put back my site online they haven’t responded for a day. Then they answered an unimportant question, still not lifting the ban. I had to write to their manager to look after the case, and voila, after almost 2 days, the site is back at last. I think my next hosting company will be a smaller one, who haven’t outsourced its support department to India yet. Don’t get me wrong, they are nice guys, and I suppose they have to answer hundreds of support cases a day for a dime. But they don’t care if your business goes bankrupt – don’t feel what’s important and what’s not. I suppose they mustn’t bring forward the urgent cases, and they can’t improvise – they seem to answer only with pre-compiled panels. As I myself give support in jalbum.net, I see how important it is balancing between the cases, and listen to the details. Even though every other case can be answered with macros, quite a few requires special attention, and expertise. And in almost every time the users’ anger is justified. It’s crucial to handle these cases well – those who are the most short-tempered can be the best advocates in the future.

Thank You,
Laza

Categories
addScroll plugin jQuery

AddScroll plugin

This plugin will add a vertical scrollbar to a layer which has content deeper than its container parent. It will watch if the window has resized, and adjusts itself. The content can be scrolled on devices with touch interface too.

Syntax

$(layer).addScroll({ options });