| Author |
Topic Search Topic Options
|
aysolaw5
Newbie
Joined: 26 April 2004
Location: United States
Status: Offline
Points: 3
|
Post Options
Thanks(0)
Quote Reply
Topic: Database Connections Version 7.7a Posted: 26 April 2004 at 5:21pm |
HI!
My ISP provider READYHOSTING, had to take the following action so that it could unload my database connections, which allowed the forum to come up again. They segusseted that I should review my coding and make sure that my database connections are getting closed.
So my question is... Where in the code can it be changed to make sure that the database connections are getting closed? Can a default timer can be added so that the DB closes when there is no activity? I'm using the the Access DB in this forum.
Thanks in advance for your time and patience on this I'm a newbe to ASP.
Cheers!!!
aysolaw5
|
 |
pmormr
Senior Member
Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
|
Post Options
Thanks(0)
Quote Reply
Posted: 26 April 2004 at 5:30pm |
|
this forum? as in WebWizForums? it probably isn't the forum, write them a letter and ask them if they're sure it's you
|
|
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 26 April 2004 at 6:09pm |
There's no way to globally close all open connections, but they will time out eventually.
Good programming practice dictates that you only open a db connection, or instantiate an object, just before you use it. Immediately upon finishing a task, you close the connection/set an object to "".
Opening a connection or instantiating an object in the global.asa will also get you into trouble.
Leaving connections/ojbects active tends to crash a well used site pretty quickly. I think if WWF was leaving connections open, we'd have heard about it before this.
Edited by dpyers
|
Lead me not into temptation... I know the short cut, follow me.
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 27 April 2004 at 4:52am |
|
Web Wiz Forums closes all connections and drops all objects once they are used.
This has been checked many, many, times and if someone does find any
that aren't then let me know and I'll correct it for the next version.
But I'm 99% sure that I haven't missed any.
I often find that many of the mods available are badly written and
often leave connections, recordsets, and objects open, which does
course problems.
If you have installed any mods on yoru forum check the coding in these mods.
|
|
|
 |
aysolaw5
Newbie
Joined: 26 April 2004
Location: United States
Status: Offline
Points: 3
|
Post Options
Thanks(0)
Quote Reply
Posted: 28 April 2004 at 2:07am |
HI!
This is a generic, plain install of Web Wiz Forums. The ONLY MOD I did was to the default_stlye.css. Plus, I changed the web_wiz_forums.gif, to the Website LOGO keeping the same web_wiz_forums.gif name.
Thats about it.
Is there any specfic questions you like for me to ask my ISP, to help resolve this?
This is link to the Forum...http://www.kenaston.org/forum/default.asp
Again, Thanks & Cheers!!!
aysolaw5
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 28 April 2004 at 3:06am |
|
It's not just the forum that can effect this, others files on your site
not closing objects and connections can effect the running of your
entire site.
Also as you are on a shared hosting web server, other sites on the
server can effect the running of your site, as often your memory
allocation will be shared with a mutiple number of sites.
Anyone of these sites not closing connections and releasing objects could effect your site.
It's just one of those things you have to put up with in a shared hosting environment.
The only solution would be to move your site to it's own dedicated
server, but then you would be looking at paying many 100's each month.
|
|
|
 |
Semikolon
Senior Member
Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
|
Post Options
Thanks(0)
Quote Reply
Posted: 28 April 2004 at 12:50pm |
|
WWF is definately NOT the problem..
I did a manual replace of resetting of objects before all redirects and
processing stops and I found two occurences where the connection object
were set to Nothing two times instead of closed one time and set to
nothing one time.
I don't remember what files it was in, but I think one of the was in the admin area
This should be found easily by doing a simple search
|
 |
aysolaw5
Newbie
Joined: 26 April 2004
Location: United States
Status: Offline
Points: 3
|
Post Options
Thanks(0)
Quote Reply
Posted: 23 June 2004 at 3:19am |
I'm now getting this error...
Microsoft JET Database Engine error '80004005'
Unspecified error
/forum/common.asp, line 260
Any help would be greatfull!
Thanks & Cheers!!!
aysolaw5
|
 |