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)
 object closing
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

KaiSDD
Starting Member

2 Posts

Posted - 10 April 2002 :  06:23:34  Show Profile
i´ve had a problem with the forum which keeps the server from working after a while. dllhost.exe uses 100% processor power and i need to restart the whole server. 30 minutes later the server hangs again.

i think it´s a memory problem so i wrote a sub which closes all recordset and connection object within the snitz forum.

maybe it´s intresting for other people.

insert the following sub into the inc_functions.asp:


sub destroyAll()
On ERROR RESUME NEXT

If IsObject(my_Conn) then
my_Conn.close
Set my_Conn = nothing
End if

If IsObject(objConnBoard) then
objConnBoard.close
Set objConnBoard = nothing
End if

If IsObject(rsConfig) then
rsConfig.close
Set rsConfig = nothing
End if

If IsObject(rsInfo) then
rsInfo.close
Set rsInfo = nothing
End if

If IsObject(rsMod) then
rsMod.close
Set rsMod = nothing
End if

If IsObject(rs) then
rs.close
Set rs = nothing
End if

If IsObject(drs) then
drs.close
Set drs = nothing
End if

If IsObject(delrep) then
delrep.close
Set delrep = nothing
End if

If IsObject(rs1) then
rs1.close
Set rs1 = nothing
End if

If IsObject(rsForum) then
rsForum.close
Set rsForum = nothing
End if

If IsObject(rsArchive) then
rsArchive.close
Set rsArchive = nothing
End if

If IsObject(rs_date) then
rs_date.close
Set rs_date = nothing
End if

If IsObject(rsGetMemberID) then
rsGetMemberID.close
Set rsGetMemberID = nothing
End if

If IsObject(rsdrop) then
rsdrop.close
Set rsdrop = nothing
End if

If IsObject(rsChk) then
rsChk.close
Set rsChk = nothing
End if

If IsObject(rsGetMemberName) then
rsGetMemberName.close
Set rsGetMemberName = nothing
End if

If IsObject(rsAccess) then
rsAccess.close
Set rsAccess = nothing
End if

If IsObject(rsStatus) then
rsStatus.close
Set rsStatus = nothing
End if

If IsObject(rsAllowedMember) then
rsAllowedMember.close
Set rsAllowedMember = nothing
End if

If IsObject(rsGetMemberNumber) then
rsGetMemberNumber.close
Set rsGetMemberNumber = nothing
End if

If IsObject(rsCount) then
rsCount.close
Set rsCount = nothing
End if

If IsObject(rsWatch) then
rsWatch.close
Set rsWatch = nothing
End if

If IsObject(rsSub) then
rsSub.close
Set rsSub = nothing
End if

If IsObject(rsLoop) then
rsLoop.close
Set rsLoop = nothing
End if

If IsObject(rs3) then
rs3.close
Set rs3 = nothing
End if

If IsObject(rsCatLoop) then
rsCatLoop.close
Set rsCatLoop = nothing
End if

If IsObject(rsForumLoop) then
rsForumLoop.close
Set rsForumLoop = nothing
End if

If IsObject(rsTopicLoop) then
rsTopicLoop.close
Set rsTopicLoop = nothing
End if

If IsObject(rsReplies) then
rsReplies.close
Set rsReplies = nothing
End if
end sub


then call destroyAll() in inc_footer.asp

destroyAll()



p.s. sorry for my bad english. i´m from germany

KaiSDD
Starting Member

2 Posts

Posted - 10 April 2002 :  06:25:47  Show Profile
i forgot...

the board runs smoth now.
the site is http://www.photocase.de

thanks for that fine piece of work (the board ;)

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 10 April 2002 :  11:09:28  Show Profile
That's pretty intresting. Agreed that some parts of our code doesn't explicity close all recordsets, but the Connection is closed in the inc_footer.asp file already.
I would presume that most or some of the mods do forget to close thier connections and/or recordsets.

But all this has been fixed in the next version.

«------------------------------------------------------»
Want to know when the next version comes out,
as soon as possible? Join our Mailing Lists !
Go to Top of Page

jmdyas
Starting Member

4 Posts

Posted - 25 April 2002 :  00:05:14  Show Profile
I have had sort of the same problem. My asp pages stopped working periodically, and my web host provider said that my database connections probably weren't all being closed. He gave me some sort of higher pooling and reset the server. Now all is working (for now). I put in the code above so hopefully that will stop it from happening again. This happened to me when I wrote my own code for a calendar on our web site. I wasn't closong the connection and recordset. Once I did it never happened again till now.

Go to Top of Page

putimeswebmaster
New Member

67 Posts

Posted - 13 May 2002 :  22:14:03  Show Profile  Visit putimeswebmaster's Homepage
I have the eact same problem right now.
My host has applied a script that kills dllhost.exe every 5 minutes.
I just applied this change. Is inc_footer.asp included in every major script?

Steve

Pop Up Times Webmaster
http://www.popuptimes.com
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 13 May 2002 :  22:21:53  Show Profile
quote:

i forgot...

the board runs smoth now.
the site is http://www.photocase.de

thanks for that fine piece of work (the board ;)





KaiSDD,

You are missing the Snitz Forums 2000 Powered By Logo/Text link which is required to be displayed on all forum pages. The code that displays it is in the inc_footer.asp file.

There were comments around this code that SPECIFICALLY state that the code cannot be Modified or removed.

Please correct this Immediately.

Thank You!
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.49 seconds. Powered By: Snitz Forums 2000 Version 3.4.07