1 (edited by LeLoMBriK 2006-03-01 14:22)

Topic: High load from PunBB

Hi all,

I have launched a PunBB Forum for a year now and I have a big issue.
The forum is very demanding in MySQL resources, it slows down the server, and if I deactivate it, the server works freely again.
I deactivated the option "Search all Forums" but it didn't help.
There are around 100 to 200 persons permanently connected.

Do you have a clue what the problem could be?

thanks beforehand

Re: High load from PunBB

200 people using MySQL = high server load. It's not a bug or anything, it's what you'd expect.

Re: High load from PunBB

Is there a possibility of fixing this ? By limiting the number of requests or something

Sometimes with 150 users connected, the load is low but it is sometimes very high with 100 users connected (~70 - ~80 - ~120)..

Re: High load from PunBB

is it your own server, or are other people using it? And does it run things such as backups, PunBB might not be the only reason for the high load

5 (edited by LeLoMBriK 2006-03-01 18:23)

Re: High load from PunBB

It's my own server, I use it just for my website, www.lelombrik.net (french)

I doesn't run backups or things like that.

I had 102.0 of load just now (mainly  mysqld), I have switched the forum off (maintenance mode), and now , the load is 1.8 and the sever works freely

Re: High load from PunBB

102 is bad lol, something must be wrong, are the tables missing indexes or something?

Re: High load from PunBB

Try renaming the script extern.php to something else and see if the load drops.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

8

Re: High load from PunBB

tyr to tweak mysql server for heavy load by using more memory for cache .. ther are plenty of guides on net how to do that ...

9 (edited by LeLoMBriK 2006-03-02 18:16)

Re: High load from PunBB

I tried to log the slow MySQL queries (by enabling the property in the mysql config file), I waited about one day, and I opened the log file...
The file is about 800KB and contains mostly (about 98% of the file) this query :

# Time: 060302 16:35:41
# User@Host: lelombrik[lelombrik] @ localhost []
# Query_time: 21  Lock_time: 0  Rows_sent: 10  Rows_examined: 1763
SELECT u.id AS userid, t.id, t.subject, t.last_poster, t.last_post_id, t.last_post 
FROM punbb_topics AS t 
INNER JOIN punbb_forums AS f ON f.id = t.forum_id 
LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id = f.id AND fp.group_id=3) 
INNER JOIN punbb_users AS u ON u.username LIKE t.last_poster 
WHERE (fp.read_forum IS NULL OR fp.read_forum=1) 
ORDER BY t.last_post_id DESC 
LIMIT 0, 10;

I didn't look at the PunBB code but I think this should be the index page of the board ?
I don't know why this query is so slow, maybe because of the join with a string... ?

Edit : I tried to rename the extern.php also, but it didn't change anything ! sad

Re: High load from PunBB

I don't think that's a PunBB standard query :-/
What mods have you installed?

11 (edited by mariacallas.org 2006-03-02 19:42)

Re: High load from PunBB

Server specs???

and disable User has posted earlier option

Re: High load from PunBB

Smartys is right. That's not a PunBB query. Must be a mod you've installed.

And yes, the reason it's slow is probably because you're joining two big tables on a varchar column.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: High load from PunBB

Okay, I found the query. My developer was using it in the site menu, so it was very ofently executed. I removed it and now the sever's load & speed seem to be allright.

Thanks for your interest in my problem ! smile

14

Re: High load from PunBB

Since it appears this is not a bug, moving to troubleshooting.