What's new
The Front Row Forums

Register a free account today to become a member of the world's largest Rugby League discussion forum! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Slowness in threads?

TooheysNew

Coach
Messages
1,109
Zaphod said:
Dimah not a bad idea but the problem is they will be running off of the same server so same problem comes up.

The problem won't be as bad if you run seperate databases off the same server, because each thread will only have to search for the posts it needs from a shorter list of threads, ie it wont have to search through as many forum_ID numbers to find what it wants.

For example,

Say database1.phpbb_posts has 1000 rows, then a thread with its data stored in this database would have to search 1000 rows with the query 'forum_id=2' to find what it wants.

If this database was split into two, database1 and database2, each with a phpbb_posts table, then each thread would only have to search through 500 rows with the query, thus halving the searching time.

The fact that both are located on the same server should not make a difference, because the server is not going to be under any greater load than it already is. All thats going to change is the number of queries, and the query is on a different database anyway, so that shouldnt matter.
 

Zaphod

Juniors
Messages
397
I get the theory but you have to think of the aditional overheads in mySQL. You can no longer have a persistent connection either so everyone has to keep sending requests to each database.

It becomes a nightmare in the end.

Its also the fact I am away for a few weeks as of saturday and dont have time to split out all the data
 

TooheysNew

Coach
Messages
1,109
Why can't you have a persistent connection? It's possible to have multiple persistent connections to databases, just ensure that the link identifier is correct for the connection trying to be made.

The overheads won't be bad once it gets implemented, and you should be able to set up a cron job to clear overheads at 12.00 every night or whatever, whenever traffic is lowest to the site.

The data doesn't need to be split manually, run a script that reads from the database all data for a particular forum, moves it to the new database, and deletes from the original database.

I think that would work, if you can see any other reasons why it wouldn't let me know and i'll try and come up with a solution.

(BTW: im not trying to be a smartarse or a know-it-all, because I could be wrong, i'm just trying to help.)
 

Willow

Assistant Moderator
Messages
109,912
They're all good ideas Dilmah. :D The forums have sped up slightly since this morning but there's still room for improvement.
 

Skinner

Coach
Messages
13,581
Sorry to bang on about this fellas (I've just managed to struggle into this
25 post thread) but I'm not entirely sure that we are going about this problem in a logical manner.

Prior to the hack on the weekend, entering to browse threads (small or large)was "normal". In other words, reasonably quick (I'm on dial-up) for smaller threads and a little bit slower for the longer ones, but not hideously so.

So, the events have gone :

1) Hacked
2) Upgrade to get the forums up quickly
3) Reinstalling modifications that were previously applied

Something in this chain of events has caused the current problem.

If the problem had existed since day one of the LU Forums life, then
dilmah's suggestion to improve it would have been very sound.

If I was a betting man, I would lay lots of hard earned on the problem
being caused by one or more of the mods not being compatable with
the upgrade.

Just my two bobs worth.

Cheers
Skinner
 

TooheysNew

Coach
Messages
1,109
The problem probably had existed since then, as phpbb's database structure is kindof scrambled, and it was just a matter of time before the database got too large.

However I agree that it could be an incompatible mod, as version 2.0.11 does change some of the base files that the mods build on. Perhaps roll back some of the modifications, specifically the quick reply mod, try some different combinations, until things speed up.

I realize this takes time.

BTW - it wasn't a hack. It was an exploit.
 

Azkatro

First Grade
Messages
6,905
It might well be one of the mods. All it takes is one ill-conceived query that was only tested on small databases by the mod's author to throw a spanner in the works. If a particular mod is running this ill-conceived query once for each post that is to be displayed (so up to 35 at a time), that's why the bigger threads are going slower.

What kind of access do you guys have to the server the database is on? Can you setup a slow query log to see if you can work out the problem more specifically?
 

Detox

Juniors
Messages
194
I am still getting slowness in threads, they were fine when this message was first posted, now it seems to have slowed up.

Sometimes taking 5 minutes to load, other Forums I use are working fine.

It is also just the thread, the rest of the Forum, Index pages ect are fine.
 

Willow

Assistant Moderator
Messages
109,912
We'll be turning off the avatars and sig files for an hour today or tomorrow as we go through some trial and error.

Some of the banners are way too big. Detox, yours is around 30% over the limit.
 

Willow

Assistant Moderator
Messages
109,912
In the member's guidelines. 400 x 100 and maximum 2 images. 20Kb allowed.

Check the global annoucement as we're about to turn them off.
 

Latest posts

Top