PDA

View Full Version : My board keeps maxing CPU usage


JetSkiing
06-12-2008, 09:10 PM
Our board keeps getting long queries (30-300 secs) that slows the whole server to a crawl (including our other no-forum sites) due to CPU usage. Currently using VB 3.5.1 with SQL 5.0 on a (2) CoreDuo, 8Gb ram server. Could it be SQL injections, DDoS attacks or coding issues. Any ideas on what types of queries are causing these problems? Our server host has provided the PHP code on the long queries but can't see anything unusual in them.

Info: We have 20000+ members and 1+ million posts.
:(

Opserty
06-12-2008, 09:34 PM
vBulletin in its normal format should run just fine, so it is probably to do with your modifications. Just disable them all and see which is causing the problems.

Theres not much else really we can do... disable any options in the vBulletin Options which aren't recommended for large boards (typically given in the option description)

Dismounted
06-13-2008, 10:09 AM
Normal vBulletin queries should not run for that long - it is probably caused by one of your modifications, as Opserty has said.

JetSkiing
06-13-2008, 04:27 PM
Is it possible that the long searches are caused by an SQL injection or DDOS attack, or is this rather unlikely? I've read that Vbulletin can be vulnerable, what I don't know is whether it is common. Have you guys ever heard of such attacks on Vbulletin? The other night I found a whole forum on how to attack Vbulletin. Nevertheless, from what you guys are saying it's most likely a modification that is unstable on a forum our size, right?"

Opserty
06-13-2008, 04:32 PM
It might it might not be... like I said there isn't much we can do. Find out which queries are taking long if they are from modifications then disable those modifications. It could be a modification, just test and find out for yourself. We aren't going to offer you unsuitable advice, we are here to help you.

Both vBulletin.com and .org are fairly large sites and they don't have large load times so it is something specific to your board. (vBulletin runs all these modifications too so...)

It might be some kind of attack but I doubt it. If your host is any good they should be able to analyse any stats they have and tell you what is going on. But if it is just queries it means there is something up with the MySQL or some SQL Queries.

MixMakers
06-13-2008, 06:11 PM
It might it might not be... like I said there isn't much we can do. Find out which queries are taking long if they are from modifications then disable those modifications. It could be a modification, just test and find out for yourself. We aren't going to offer you unsuitable advice, we are here to help you.

Both vBulletin.com and .org are fairly large sites and they don't have large load times so it is something specific to your board. (vBulletin runs all these modifications too so...)

It might be some kind of attack but I doubt it. If your host is any good they should be able to analyse any stats they have and tell you what is going on. But if it is just queries it means there is something up with the MySQL or some SQL Queries.

How can you find that out?

JetSkiing
06-13-2008, 09:34 PM
One of the long queries was:
"# Query_time: 281 Lock_time: 0 Rows_sent: 100 Rows_examined: 477587
SELECT thread.threadid, thread.title,
thread.postusername, thread.dateline,
forum.forumid,
forum.title AS forumtitle,
post.pagetext AS preview

FROM vb_thread AS thread
INNER JOIN vb_forum AS forum ON(forum.forumid = thread.forumid)
LEFT JOIN vb_post AS post ON (post.postid = thread.firstpostid)

WHERE 1=1
AND thread.forumid IN(8,27,44,25,41,48,58,86,99,49,7,39,45,4,11,71,64 ,12,26,72,3,59,34,18,42,21,100,101,16,17,15,19,14, 9,62,91,84,83,46,93,80,90,66,96,1
03,70,47,89,88,38,37,98,61,76,92,85,75,102,43,79,6 3,73,82,40,94,55,69,56,57,33,68,81,6,77,65,13,22,2 3,54,29)
AND thread.visible = 1
AND post.visible = 1
AND open <> 10"

--------------- Added 1213396545 at 1213396545 ---------------

Our current hacks are:

Arcade
Automatic Welcome
Force Profile Update
Last 15 Searches
Left Column
Links and Download Manager
Members who have visited the forum
Miserable Users
Multiple Login Detector
phpAdsnew Intergration
Super Private Message
vBShout
Welcome Headers
VBAdvanced 1.x

we also had two searches available - one from the top and a window in the left column.

Dismounted
06-14-2008, 06:47 AM
I'm willing to say that it might be a vBAdvanced module.