Author |
Topic  |
putimeswebmaster
New Member

67 Posts |
Posted - 07 June 2002 : 17:01:36
|
My host is claiming that our forum database is experiencing 270,000 queries per hour. Our Database is on a shared MS SQL server and they are going to shut us down soon. The number of queries seems ridiculos to me. We experience 43,000 page views per day. How many queries does the average page view create?
Pop Up Times Webmaster http://www.popuptimes.com |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 07 June 2002 : 17:14:55
|
I know Snitz does generate a lot of queries per page, specially for default.asp and active.asp. Anyway if you have around 2,000 page views per hour, that number does look a bit huge indeed. Maybe if there's a lot of searching that can be reached, but the number looks a bit too high.
<edit>Well if you moderators constantly calling active.asp, that number can be reached. I've just checked a post by Huwr stating the sometimes for a mod as many as 4000 queries can be performed now. I'm admiting this happens with many active topics.</edit>
Maybe it's just time to find another host.<edit>I think this still applies.</edit>
------------------------------------------------- Installation Guide | Do's and Dont's | MODs
Edited by - ruirib on 07 June 2002 17:19:40 |
 |
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 07 June 2002 : 20:49:07
|
That number looks about right to me, Active.asp is probably the main culprit (100+ calls sometimes in that page alone). there was a good thread back in March on active.asp and how to improve that one, but for the life of me I can't find it anywhere now :( I'll post it if I end up finding it.
3.4 Should also be considerably more efficient on the DB calls.
Heres another thread to take a look at also on default.asp http://forum.snitz.com/forum/topic.asp?TOPIC_ID=18732
www.daoc-halo.com |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 07 June 2002 : 21:26:59
|
quote:
That number looks about right to me, Active.asp is probably the main culprit (100+ calls sometimes in that page alone). there was a good thread back in March on active.asp and how to improve that one, but for the life of me I can't find it anywhere now :( I'll post it if I end up finding it.
I guess you meant this one: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=24933
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
 |
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 07 June 2002 : 23:16:33
|
Believe it or not I spent 20 minutes trying to find that post earlier!
Thanks heaps Ruirib :)
www.daoc-halo.com |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 08 June 2002 : 07:42:37
|
quote:
Believe it or not I spent 20 minutes trying to find that post earlier!
Thanks heaps Ruirib :)
www.daoc-halo.com
You're welcome . It was a bit easier for me, since I had bookmarked it...
------------------------------------------------- Installation Guide | Do's and Dont's | MODs
Edited by - ruirib on 08 June 2002 07:45:28 |
 |
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 09 June 2002 : 00:43:57
|
Cheat   
www.daoc-halo.com |
 |
|
putimeswebmaster
New Member

67 Posts |
Posted - 11 June 2002 : 17:54:35
|
Without reading for 4 hours, was a new active.asp ever posted? Or any other significant performance fix?
Steve
Pop Up Times Webmaster http://www.popuptimes.com |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 11 June 2002 : 18:32:21
|
you can try adding clustered indexes to the forum_reply and forum_topics tables on the T_LAST_POST_DATE and R_DATE Fields respectively, I found that without these, the forums were causing page lock errors which is why people were experiencg timeout errors.
You can also try removingthe subscription checks from active.asp, as they are not really that necesary on that page
|
 |
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 11 June 2002 : 20:27:51
|
To save you some reading, this little gem of a change that Huwr came up with had considerable savings.
quote:
Yes, that's what I am doing to, I now have it down to 1.5 secs for a normal user, just by doing this
' Does user have access to the forum?? if cLng(Forum_ID) <> cLng(currForum) then testAllow = chkForumAccess(Forum_ID,MemberID,false) end if if testAllow then
instead of
' Does user have access to the forum?? if chkForumAccess(Forum_ID,MemberID,false) then
This reduced the number of queeries on my test from 1856 to 43
www.daoc-halo.com |
 |
|
putimeswebmaster
New Member

67 Posts |
Posted - 11 June 2002 : 23:02:55
|
Forgive my ignorance Gremlin. was that change in active.asp?
Pop Up Times Webmaster http://www.popuptimes.com |
 |
|
putimeswebmaster
New Member

67 Posts |
Posted - 11 June 2002 : 23:09:58
|
I get the following error trying that code change:
Microsoft VBScript compilation error '800a03f9'
Expected 'Then'
/forum/active.asp, line 359
if cLng(Forum_ID) <> cLng -------------------------^
Pop Up Times Webmaster http://www.popuptimes.com |
 |
|
putimeswebmaster
New Member

67 Posts |
Posted - 11 June 2002 : 23:14:51
|
Since I have subscriptions turned off, is there a way I can remove checking everywhere?
Pop Up Times Webmaster http://www.popuptimes.com |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 11 June 2002 : 23:27:14
|
Looks line you broke the line in the wrong place. The code in red should be there:
if cLng(Forum_ID) <> cLng(currForum) then ... Here come the next lines...
------------------------------------------------- Installation Guide | Do's and Dont's | MODs
Edited by - ruirib on 11 June 2002 23:27:38 |
 |
|
putimeswebmaster
New Member

67 Posts |
Posted - 11 June 2002 : 23:58:53
|
Thanks, next issue:
Microsoft VBScript runtime error '800a01c2' Wrong number of arguments or invalid property assignment: 'chkForumAccess'
/forum/active_smk.asp, line 360
Line 360 follows testAllow = chkForumAccess(Forum_ID,MemberID,false)
You can views the script here: http://www.popuptimes.com/forum/active_smk.asp
Pop Up Times Webmaster http://www.popuptimes.com
Edited by - putimeswebmaster on 12 June 2002 00:00:43 |
 |
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 12 June 2002 : 00:43:43
|
Quoting the reply seemed to lose most of the formatting sorry my fault.
It should look more like this
Replace this line
' Does user have access to the forum?? if chkForumAccess(Forum_ID,MemberID,false) then
With the following
' Does user have access to the forum?? if cLng(Forum_ID) <> cLng(currForum) then testAllow = chkForumAccess(Forum_ID,MemberID,false) end if if testAllow then
www.daoc-halo.com |
 |
|
Topic  |
|