Author |
Topic  |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 29 July 2005 : 12:46:16
|
According to my host, my forum is not closing all db connections. According to them the server will close them after 20 minutes but we've gotten busy enough the server can't always keep up. My forum is shutting down every 7 to 10 days when the app pool fills up. I've upgraded the account so that I now have my own pool. I spoke with someone on the hosting floor and they said I will be OK for a while to give me time to get it fixed.
We have installed several mods and I think something may have gotten messed up. My fault or the mods fault, I don't know. Really doesn't matter, I just need to get it fixed.
I'm starting to go through code and have a few questions.
1. I'm assuming I have to check recordset and database connections. Correct?
2. Does every set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open strConnString have to have a corresponding close statement? The reason I ask is, I looked at inc_header.asp. There is an opening but I do not see my_Conn.Close anywhere.
3. Do the "open" and "close" have to be 1 for 1? IOW can one "RS close" close several previously opened recordsets?
I appreciate anyones help greatly.  |
Switch the order of your title tags |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 29 July 2005 : 12:54:23
|
My_conn is closed in inc_footer.asp. Otherwise, yes, all objects need to be closed and destroyed. If you're going to be using an object with the same name a number of times through a script, you don't always need to destroy it each time, just do so when you're finished with it.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 29 July 2005 : 13:07:51
|
Thanks Shaggy.
quote: My_conn is closed in inc_footer.asp.
Well, that makes it a little tougher than I thought it would be. I assumed I would be able to look at each file 1 by 1 and match up openigs and closings. If the close could be in a different file, I guess I can't. 
Yikes. Anybody have any suggestions at an easy way to do this? |
Switch the order of your title tags |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 29 July 2005 : 13:14:03
|
Hey, maybe I have something. I did some poking around shortly after opening the forum about mixing html and asp on the same page. What I read around the internet is that as long as the block of html is at the beginning or end of the page and not "intermingled" you should be ok.
Well, I have a block of html at the beginning of inc_footer.asp (and inc_header.asp). The close (for the open in inc_header.asp) is after my block of html.
Could this be interfering with the db closure? I hope so! |
Switch the order of your title tags |
Edited by - bobby131313 on 29 July 2005 13:18:20 |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 29 July 2005 : 13:14:36
|
It's only the database connection that is be closed in a seperate file, all other objects should be destroyed in the file/function they are created in. What mods have you installed?
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 29 July 2005 : 13:49:31
|
out of interest, what database are you using ? what connection string are you using ? how big is your db ? how busy is busy ? |
 |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 29 July 2005 : 13:59:25
|
Access
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath
16MB
We're not really "busy". I guess I should have said "grown fast". We have almost 300 members and 12,000 posts in 5 months. We opened FEB 1. We are getting between 2,000 and 2,500 page loads a day.
Mods installed are:
Avatar Birthdays Custom Policy File attachment (going to be removed today) removed Metatag Generator Password Reset Topic Maker
Note: Avatar mod has a glitch that cannot be figured out. If an admin goes into a users profile to edit, the user loses their avatar and the user has to reselect it. The admin cannot. |
Switch the order of your title tags |
Edited by - bobby131313 on 29 July 2005 14:29:19 |
 |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 04 August 2005 : 11:43:38
|
Well it appears that the html was the problem. I installed the site integration mod and removed the html from header.asp and footer.asp. I now use the site integration mod for that.
I called my host today and they said it appears the connections are closing on their own now.  |
Switch the order of your title tags |
 |
|
|
Topic  |
|