Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Strange problem
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Podge
Support Moderator

Ireland
3776 Posts

Posted - 07 October 2009 :  09:58:28  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
I have a strange problem with Snitz that I cannot put my finger on.

I have two servers, one webserver & one MSSQL 2000 server that power the forums. Neither are under stress and have ample unused memory. I originally thought that I was hitting some kind of limit in IIS or W2003 but I'm not so sure now.

The following will not work in privatesend.asp (default code)

	'## Forum_SQL
	strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME "
	strSql = strSql & ", " & strTablePrefix & "PM.M_MESSAGE "
	strSql = strSql & ", " & strTablePrefix & "PM.M_SUBJECT "
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "PM "
	strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_FROM "
	strSql = strSql & " AND " & strTablePrefix & "PM.M_ID = " & strPMID

	set rs = my_Conn.Execute (strSql)

	Response.Write	"  <tr>" & vbNewLine & _
			"    <td bgcolor=""" & strForumFirstCellColor & """ valign=top width=""" & strTopicWidthLeft & """"
	if lcase(strTopicNoWrapLeft) = "1" then
		Response.Write " nowrap"
	end if
	Response.Write	"><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>" & ChkString(rs("M_NAME"),"display") & "</b></font></td>" & vbNewLine & _
			"    <td bgcolor=""" & strForumCellColor & """ valign=""top"" width=""" & strTopicWidthRight & """"
	if lcase(strTopicNoWrapRight) = "1" then
		Response.Write " nowrap"
	end if
	Response.Write	"><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Subject: " & chkString(rs("M_SUBJECT"),"display") & "</b><hr size=""" & strFooterFontSize & """>" & formatStr(rs("M_MESSAGE")) & "</font></td>" & vbNewLine & _
			"  </tr>" & vbNewLine & _
			"</table>" & vbNewLine
	rs.close
	set rs = nothing


but this will

	'## Forum_SQL
	strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME "
	strSql = strSql & ", " & strTablePrefix & "PM.M_MESSAGE "
	strSql = strSql & ", " & strTablePrefix & "PM.M_SUBJECT "
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "PM "
	strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_FROM "
	strSql = strSql & " AND " & strTablePrefix & "PM.M_ID = " & strPMID

	set rs = my_Conn.Execute (strSql)
        tempMess = formatStr(rs("M_MESSAGE"))

	Response.Write	"  <tr>" & vbNewLine & _
			"    <td bgcolor=""" & strForumFirstCellColor & """ valign=top width=""" & strTopicWidthLeft & """"
	if lcase(strTopicNoWrapLeft) = "1" then
		Response.Write " nowrap"
	end if
	Response.Write	"><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>" & ChkString(rs("M_NAME"),"display") & "</b></font></td>" & vbNewLine & _
			"    <td bgcolor=""" & strForumCellColor & """ valign=""top"" width=""" & strTopicWidthRight & """"
	if lcase(strTopicNoWrapRight) = "1" then
		Response.Write " nowrap"
	end if
	Response.Write	"><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Subject: " & chkString(rs("M_SUBJECT"),"display") & "</b><hr size=""" & strFooterFontSize & """>" & tempMess & "</font></td>" & vbNewLine & _
			"  </tr>" & vbNewLine & _
			"</table>" & vbNewLine
	rs.close
	set rs = nothing


Also, forum.asp sometimes loads with no topics (even though there are many). No error is given. If you reload it 2-3 times the topics appear.

Its almost like the recordset objects are being forgotten about.

Any thoughts or ideas ?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.

Edited by - AnonJr on 07 October 2009 12:40:44

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 07 October 2009 :  10:42:06  Show Profile  Send ruirib a Yahoo! Message
What exactly do you mean by "it doesn't work"?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 07 October 2009 :  11:22:03  Show Profile  Visit HuwR's Homepage
surely this should be in the MOD forums, pm's are not part of base Snitz
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 07 October 2009 :  11:27:50  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
formatStr(rs("M_MESSAGE")) just returns a null value. No error, nothing, not even a space. If I store it in a local variable it works. The html output from that part of the forums hsould be something like

<hr size="1">private message text goes here</font>

but instead I get

<hr size="1"></font>

I have about 500 concurrent users. Webserver cpu usage is rarely over 30-40% with about 500mb free physical RAM (not paged). The db server is running at about 20%-30% cpu usage and mssql is using about 1.5GB of 4GB total ram.

I can live with the privatesend.asp problem but the forum.asp problem is a lot more frustrating. Sometimes it works and sometimes it doesn't. I originally thought that it could be a connection pooling problem but I've more or less ruled that out. At peak times there are 130-140 open connections to the db server which are supposed to be re-used. I don't get behaviour on the webserver that indicates that any of these connections are timing out. Nothing at all it returned. When forum.asp fails the page shows as if there are no topics in the forum (but there are). After reloading 2-3 times they show up.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 07 October 2009 :  11:29:44  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Huwr, I think its a sql server issue (its not because of the private messages mod - thats just an example). I'll move it and fix the subject if I can narrow the problem down. This forum seemed the most appropriate at the time.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 07 October 2009 :  12:30:07  Show Profile  Visit HuwR's Homepage
I don't thing it is a forum issue so shouldn't really be in forum help, seems like either an iis or asp process issue since sql is obviously returning data because you can assign it to a local variable and it works. have you tried running chdsk and defragging the drives on the webserver.

are these physical or virtual machines?
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 07 October 2009 :  12:41:56  Show Profile  Visit AnonJr's Homepage
Sorry, had to fix the scrolling thing... there's just something about having to scroll sideways on a 23" screen.

Edited by - AnonJr on 07 October 2009 12:42:40
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 07 October 2009 :  12:44:14  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Physical machines. I've defragged all drives on the webserver & sql server. I've defragged all the table indexes too. I could understand if forum.asp was timing out but nothing at all is being returned, no error, nada.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 07 October 2009 :  12:54:48  Show Profile  Visit HuwR's Homepage
quote:
Originally posted by AnonJr

Sorry, had to fix the scrolling thing... there's just something about having to scroll sideways on a 23" screen.


maximise your browser then you shouldn't have to scroll, there certainly wasn't enough in the post to fill 23" screen unless you have supersized your fonts
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 07 October 2009 :  13:03:43  Show Profile  Visit HuwR's Homepage
quote:
Originally posted by Podge

Physical machines. I've defragged all drives on the webserver & sql server. I've defragged all the table indexes too. I could understand if forum.asp was timing out but nothing at all is being returned, no error, nada.


can't think of anything that would cause it
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 07 October 2009 :  13:42:02  Show Profile  Visit modifichicci's Homepage
I have found that problem on some mssql forum, i have had to assign the value to a variable to let them work, but not all the variables, only some of them such as text variables.
As we havent access to server that is the only thing we could have done.

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 07 October 2009 :  14:16:45  Show Profile  Visit HuwR's Homepage
try putting M_MESSAGE as the last column in your select statement, I think this is a known issue when returning text fields using some versions of MDAC
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 07 October 2009 :  15:10:46  Show Profile
That does sound familiar Huw, think we had to do the same in the base forum code.
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 07 October 2009 :  16:34:34  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
So if you select columns in this order;

strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME "
strSql = strSql & ", " & strTablePrefix & "PM.M_MESSAGE "
strSql = strSql & ", " & strTablePrefix & "PM.M_SUBJECT "

you have to use them in the same order?

Frankly, I would prefer to assign them all to local variables and use them in any order I want.

I think we should have an SQL forum.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 07 October 2009 :  16:42:28  Show Profile  Visit HuwR's Homepage
quote:
Originally posted by Podge

I think we should have an SQL forum.



we do have one http://forum.snitz.com/forum/forum.asp?FORUM_ID=22
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 07 October 2009 :  16:43:39  Show Profile  Visit HuwR's Homepage
quote:
Originally posted by Podge

So if you select columns in this order;

strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME "
strSql = strSql & ", " & strTablePrefix & "PM.M_MESSAGE "
strSql = strSql & ", " & strTablePrefix & "PM.M_SUBJECT "

you have to use them in the same order?

I think we should have an SQL forum.


No, you have to put M_MESSAGE last so your query would be

strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME "
strSql = strSql & ", " & strTablePrefix & "PM.M_SUBJECT "
strSql = strSql & ", " & strTablePrefix & "PM.M_MESSAGE "
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.47 seconds. Powered By: Snitz Forums 2000 Version 3.4.07