Jump to content

forum crash


Husky

Recommended Posts

  • Replies 313
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Is the forum still locking out for people on a night? If so please can you use this thread to detail what you were doing at the time, in chat for example or just browsing the forum. Date and time is especially important.

 

As this site doesnt have full time moderators/admins it is very hard for us to nail down problems like this especially if they are assocaited to an unsupported mod like chat, which we may just have to remove/replace.

 

Traffic to the site has grown greatly over the past few months so any tuning we are doing it just holding water with the new found attention we are getting - but we will do our best to keep the site up as much as possible. We may well be moving to a managed UK host in the near future which should also help us out.

 

To reiterate - the more details we have the better to help work out what is wrong ;)

Link to comment
Share on other sites

Is the forum still locking out for people on a night? If so please can you use this thread to detail what you were doing at the time, in chat for example or just browsing the forum. Date and time is especially important.

 

 

To reiterate - the more details we have the better to help work out what is wrong ;)

 

Evenings last week around 22:00-23:00 - Just browsing and posting - I'm never in chat :)

Link to comment
Share on other sites

We know the fix, and just need to implement it. As it requires low level database changes we are being very cautious about this and it requires Chris to perform it as he has the right access. Even after the change there may still be some tuning required so it might take a while to get things back to how they should be.

 

Unfortunately this is a our own doing becoming so successful. We are far larger than we have ever been and even in just the last 12 months we have twice as many visitors as before (actual visitors not bots), and also a lot more interest from places like Google who like to keep up to date with the site which is very busy. This means the DB is having to work harder than before and needs to be tuned as such, which it isnt out of the box.

 

You mentioned that you thought it might be a DB Design issue. I am a DBA and i am happy to act as a second set of eyes if you think it would help.

 

Steve

Link to comment
Share on other sites

You mentioned that you thought it might be a DB Design issue. I am a DBA and i am happy to act as a second set of eyes if you think it would help.

 

Steve

Do you know much about MySQL and MyISAM/InnoDB? I know a lot of DBAs in my field of work but they are all DB2 and Oracle based being that they work for big firms. The problems we are looking at are tuning these to the size that the forum has now become. MySQL is good out the box for small forums, but as we have so many people logging on at once now its becoming overwhelmed (not a hardware issue) with table locking. We're moving table(s) over to InnoDB as we think this will solve it :thumbs:

 

FWIW the forum isnt acutally crashing, its hitting near deadlock as tables become locked and all queries are queued behind it. This queue eventually gets so long that the server takes a long time to recover. Google/Bing bots live on here and make lots of requests which make the queue grow very quickly too. Its not a hardware issue as the server has loads of resource left, its an internal bottleneck of MySQL and MyISAM.

Link to comment
Share on other sites

You mentioned that you thought it might be a DB Design issue. I am a DBA and i am happy to act as a second set of eyes if you think it would help.

 

Steve

Do you know much about MySQL and MyISAM/InnoDB? I know a lot of DBAs in my field of work but they are all DB2 and Oracle based being that they work for big firms. The problems we are looking at are tuning these to the size that the forum has now become. MySQL is good out the box for small forums, but as we have so many people logging on at once now its becoming overwhelmed (not a hardware issue) with table locking. We're moving table(s) over to InnoDB as we think this will solve it :thumbs:

 

FWIW the forum isnt acutally crashing, its hitting near deadlock as tables become locked and all queries are queued behind it. This queue eventually gets so long that the server takes a long time to recover. Google/Bing bots live on here and make lots of requests which make the queue grow very quickly too. Its not a hardware issue as the server has loads of resource left, its an internal bottleneck of MySQL and MyISAM.

 

Sadly, i specialise in MS SQL, but i do have limited experience with MySQL.

 

You mention that its not a hardware issue, so i assume that you still have available I/O resources on your disk system during these lock ups?

 

In terms of the choice between MyISAM and InnoDB, I would say that you are best of with InnoDB. The reason for this is that disk operation's are managed by the engine rather then the OS. I believe it also organises the table data by the primary key, rather than a LIFO stack.

 

There is however in inherent limit on the number of transactions that this engine can preform in a given period and while i dont think a site of this size (No offence :D ) would trouble that limit, it worth keeping in mind.

 

If you are experiencing true deadlocks then the engine change may not be enough to solve your problems. You may find that normalizing\denormalizing the table structure will solve a deadlock issue best.

Link to comment
Share on other sites

No offence taken - we know we're not that big compared to some other forums out there. I have worked/work doing data ETL/warehousing for some of the worlds biggest telco's and payment processors so know what truely massive volumes look like :teeth: What we do know is that the number of people trying to log on at once causes a sessions table to lock up, which InnoDB will fix. This is not helped by a problem that may be lingering in the chat mod too which I need to look at tonight.

 

We should be fine moving over to InnoDB alone. Its what phpBB forums themselves use and as you say, we're not a big forum in that sense, so its just the table locking that is the issue. We know there is plenty of disk IO and CPU left to spare. InnoDB has the problem that it doesnt support full text searching so we cant move all tables without very big modifications to the forum, but the tables effected fortunately arent searched, so we are ok. All thats really happened is that we've grown too big/busy for MyISAM engine which is the MySQL default.

Link to comment
Share on other sites

The change to innoDB on at least one table that we believe is locking up is one of the fixes we hope to employ, however we do need to take the site offline to do this as the table in question is incredibly large, so its not doing it on the fly like we would hope.

 

The plan is to take the forum offline later one evening, make the table change, and switch back on within the hour. This may be tonight.

Link to comment
Share on other sites

Sounds like you have things covered.

 

Does the sessions table link to many other tables? My guess would be that it is one of more of those relationships that is causing the locking issue.

 

Using a transactional engine such as InnoDB will solve the above problem, but if the design is flawed it is likely to bite you in the arse again.

Link to comment
Share on other sites

The sessions table as you can imagine is like the gatekeeper to the forum. Before you can do anything (log in, view thread, post, create PMs), it goes to the sessions table to see what your status is. Due to the design of MyISAM, anything that changes in that table locks the whole thing, not only to other writes but also reads. You can see how this can be quite catastrophic then when it decides to lock for anything more than a few seconds, literally no one can do anything. InnoDb removes this and things should run a lot smoother.

 

WRT to the backend design, not a lot we can do with that, its phpBB's remit. But going by fact there are bigger forums out there using it, we should be ok. They are all using InnoDB which shows us its the right way to go :thumbs:

Link to comment
Share on other sites

Well i have learn something new about MyISAM today. Having worked with MS SQL for so many years, i have trouble getting my head around some of the design choice of other products. Either that or MyISAM is actually rubbish!

 

Anyho, best of luck for the switch!

Link to comment
Share on other sites

The change to innoDB on at least one table that we believe is locking up is one of the fixes we hope to employ, however we do need to take the site offline to do this as the table in question is incredibly large, so its not doing it on the fly like we would hope.

 

The plan is to take the forum offline later one evening, make the table change, and switch back on within the hour. This may be tonight.

 

Not tonight!!! Britains next top model is on and i'll have to sit through that shite if i cant get on the forum!!

Link to comment
Share on other sites

The change to innoDB on at least one table that we believe is locking up is one of the fixes we hope to employ, however we do need to take the site offline to do this as the table in question is incredibly large, so its not doing it on the fly like we would hope.

 

The plan is to take the forum offline later one evening, make the table change, and switch back on within the hour. This may be tonight.

 

Not tonight!!! Britains next top model is on and i'll have to sit through that shite if i cant get on the forum!!

 

 

http://zclub.net/forum/ :p

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...