Page 1 of 1

What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 11:08 am
by DaveB
This (bluehost) account (i.e. the whole DSLRUsers site) suspended, This account disabled, This board not available...
I thought these sorts of things weren't meant to happen with the new hosting provider? :roll:

Whatever it was, congrats on getting things back up and running!

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 11:26 am
by Mr Darcy
DaveB wrote:Whatever it was, congrats on getting things back up and running!


:agree:
Thanks muchly Gary

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 11:28 am
by ATJ
Looked like it was broked.

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 11:35 am
by sirhc55
Might have been an interdiction attack from Dreamhost :roll:

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 11:42 am
by gstark
I'm not entirely sure myself. :roll:

When I got up and went to check my email, my email client started asking me for my password. (Everything of mine is hosted at the same location ... )

When I went to my home page ... account suspended ...

Fortunately, Bluehost have their online chat support .... their story is that one of my databases is killing the server.

So ... I've gone in, optimised the databases ... they have a set of logs that record slow mysql queries, and I'm going to be looking at those, and then try to track the queries back to the source files from which they're made ...

BUT ...

I have noticed that, on Friday mornings Sydney time, I see a general slowdown in the server. There seems to be an overload of the server, our (my) systems get canned for a few minutes - their normal procedures - and then it comes back up through the normal course of events.

Today seems to have been an extreme version of what I've already observed.

My gut feeling suggests to me that there's something else happening on the box, but of course this is not something that I have any real access to.

I'm also thinking that the database is big, and thus I'm starting to think that I may create an archival site, and move everything there, then purge this database - the primary one - so that it only contains, say, the last three months' worth of data.

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 11:45 am
by chrisk
i'll tell you one thing though. the performance and the reliability of the site now is outstanding. great work gary et al. :cheers:
(although not being able to maximise over my whole screen is annoying.)

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 12:13 pm
by sirhc55
Rooz wrote:i'll tell you one thing though. the performance and the reliability of the site now is outstanding. great work gary et al. :cheers:
(although not being able to maximise over my whole screen is annoying.)


:agree:

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 1:11 pm
by Glen
Gary I found the site intolerably slow this morning at 5am, exactly as you described. I couldn't even jump from thread to thread. A few hours later it was fine, then a bit later the site was gone and the bluehost message was up

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 1:36 pm
by gstark
Glen wrote:Gary I found the site intolerably slow this morning at 5am, exactly as you described. I couldn't even jump from thread to thread. A few hours later it was fine, then a bit later the site was gone and the bluehost message was up


Glen,

Could you please define "a few hours later" and "a bit later" for me ?

We just had a CPU exceeded error - the first ... with one query ostensibly taking 183 seconds of CPU time. Unfortunately, the slow sql query log doesn't yet tell me what this query is, so I have no way of trying to track this down.

In phpbb3 there's a server load parameter in the admin section, and it describes itself as being able to shut the board down if cpu load exceeds a defined value. It describes the value as a part of a CPU, but when I tried setting this to 0.45 - which I think should be allowed - it disabled the board as if it was being overloaded.

Does anyone have any thoughts on that?

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 1:41 pm
by Matt. K
Glen
What the hell are you doin up at 5am? Delivering newspapers? Get back to bed and get some quality sleep time!

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 2:45 pm
by Glen
Matt - you are right.

Gary, because my lack of sleep I am not sure when it was ok, maybe 6.30am or 7.30am? That is why I didn't quantify. It was stuck at 5am though, stuck dead.

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 3:04 pm
by gstark
Thanx Glen.

That's consistent with when it all fall down and go boom. :)

I just tried the load settings value ... set it to 1 which is the maximum value according to the documents, and is the equivalent of an average of 100% CPU load over an average of one minute. She no workie! :(

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 3:11 pm
by gstark
I've just put in a limitation on the number of sessions that can be in play over a one minute period. Let's see if that helps deal with the issue, or just makes it hard for you to access the site.

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 3:39 pm
by ATJ
I just got told the site was unavailable. Well... maybe 20 minutes ago.

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 3:50 pm
by Ant
When I have gotten over my extended lunch at Lynches I will re-read this thread and see if I can provide some help... now to go to sleep under my desk for a little while :evil:

Ant.

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 4:49 pm
by moz
gstark wrote:In phpbb3 there's a server load parameter in the admin section, and it describes itself as being able to shut the board down if cpu load exceeds a defined value. It describes the value as a part of a CPU, but when I tried setting this to 0.45 - which I think should be allowed - it disabled the board as if it was being overloaded.


You sure it's not a percentage rather than a raw number? Just chequing...

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 6:24 pm
by gstark
moz wrote:
gstark wrote:In phpbb3 there's a server load parameter in the admin section, and it describes itself as being able to shut the board down if cpu load exceeds a defined value. It describes the value as a part of a CPU, but when I tried setting this to 0.45 - which I think should be allowed - it disabled the board as if it was being overloaded.


You sure it's not a percentage rather than a raw number? Just chequing...


That's a valid question. Here's the explanatory text from the setting in the admin panel ....

Limit system load:
If the system’s 1-minute load average exceeds this value the board will automatically go offline. A value of 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers and where this information is accessible. The value here resets itself to 0 if phpBB was unable to get the load limit.


The documentation refers to a valid value as being between 0 and 1, all of which points to this not being a percentage.

Taking this to the next level, and looking at the admin tools on BH, I see a table, with lots of rows and data and green dots (meaning "good") and this is included amongst that data ...

Server Load 1.72 (4 cpus)


Which, if that's the sort of number that's being reported by BH to phpbb3, then it's not all that surprising that this doesn;t work all that well.

Looking more deeply, I've located a php script the guts of which are ...

Code: Select all
     
     $load = file_get_contents("/proc/loadavg");
     $load = explode(' ', $load);
     return $load[0];


My thoughts are to run a cron job with this code embedded, and set the board disable value based upon the value returned by this code snippet. I need to find what a good trip-value would be (10, 20, 50?), and I need to find what database values to change (it seems to be more than just the most obvious one in the config table, because my tests failed to disable the board. :) ) and then just run a cron job with, say, a frequency of once per minute.

In working through this I'm also trying to decide whether to update the database every time (not a lot of load, but mostly unnecessary transactions in the database - which might mean more load) or to just write and read a semaphore file, and only update the database when a state change is required. The former is easier, but I think the latter would be a better solution.

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 9:45 pm
by gstark
gstark wrote:In working through this I'm also trying to decide whether to update the database every time (not a lot of load, but mostly unnecessary transactions in the database - which might mean more load) or to just write and read a semaphore file, and only update the database when a state change is required. The former is easier, but I think the latter would be a better solution.


Ok, done. Sorry for those of you who may have been inconvenienced by my testing this evening.

I had issues with updating the database: I could change the correct records, but it was not registering within the application. I suspect that it's because of some caching of the variables being used, and my changing of the database through an external application isn't directly able to affect those values ...

So ...

There's a security feature whereby phpbb disables itself in certain other conditions, such as if it detects the presence of an installation directory.

Thus, I now have a perl script that imposes no database overhead, but is able to monitor the server's load at any given time, and in the event that the load exceeds a nominated point, it will disable the board temporarily ... until the load situation subsides. The cron job runs every two minutes.

As an added bonus, the crontab always sends me an email with the output from the task. I've set up a special reciever for this, and I should be able to, if I so desire, be able to keep some stats of what the server's load has been over time.

Re: What happened to DSLRUsers this morning?

PostPosted: Fri Dec 19, 2008 10:13 pm
by Nnnnsic
If you do make an archival site, you're going to have to stop telling people to search when they ask a question. :P