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

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Unbalanced SET commands
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 3

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 20 November 2004 :  20:05:13  Show Profile  Visit HuwR's Homepage
not closing a couple of recordsets that may be used once or twice a month, or less is not a problem, since they are AUTOMATICALLY closed by IIS anyway, when you have lots of objects on a page then of course it is good practice to close them as soon as you are done with them, but in the case of the items you have highlighted they are going to get dumped within seconds or less anyway, it's not like a thousand people are opening them at once, they are isolated objects created by one user 99.9% of the time as well.
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 20 November 2004 :  22:41:45  Show Profile
Closing objects by code is good programming practice, but not an absolute necessity. As HuwR has said over and over, IIS destroys all objects and variables automatically as soon as your asp page falls out of scope. However, if the server resources are "stretched thin" the small extra time the resource is held open may cause some problems, but imho that's more a sign of overloading than a coding problem.

This is a useful page

http://support.microsoft.com/kb/258939/EN-US/

$000000000000.02




======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 20 November 2004 :  22:47:50  Show Profile
And again, it's not a server overload problem.

So 95+% of objects are closed in the basecode, but the other don't have to be closed.

quote:
Closing objects by code is good programming practice, but not an absolute necessity.

And that's an oxymoron
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 21 November 2004 :  01:44:28  Show Profile  Visit Gremlin's Homepage
If you removed every set = nothing from the base code I'll bet everyone would be jumping up and down becuase of poor performance, I personally don't think theres any excuse not to use good practice all the time every time whether you think it's neccesary or not.

You can't just rely on IIS getting it right, it's been documented by many a site over the years that IIS's internal garbage routines are not as good as they should be.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 21 November 2004 :  02:10:55  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
I'm getting a feeling of de-ja-vu (or however you spell that)...

I seem to remember this topic being brought up over and over again, ending up with the same result over and over again.

-Stim
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 21 November 2004 :  05:39:15  Show Profile  Visit Gremlin's Homepage
quote:
However, if the server resources are "stretched thin" the small extra time the resource is held open may cause some problems, but imho that's more a sign of overloading than a coding problem.
Let me just state this again this server isn't overloaded, we have less than a dozen active sites on here, 2 of them are unmodified Snitz forums runing on SQL Server that get close to 4 times as many hits as Lasers and have NEVER once managed to kill ASP to the point where I've had to manually recycle the application pool.

Access is most likely the main culprit in lasers case I believe, but I see no harm at all in first ensuring the code used on his site is first following best practices before taking on the task of converting the databases over to SQL Server.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 21 November 2004 :  06:26:09  Show Profile  Visit HuwR's Homepage
quote:
Originally posted by Gremlin

If you removed every set = nothing from the base code I'll bet everyone would be jumping up and down becuase of poor performance,


Yes I agree 100%, but the open objects laser is finding are not objects that are used regularly, they are either in rarely used admin or setup functions and would get used once or twice a month.

I also don't deny that many of the fully or heavily modded forums can cause problems, but how is this a fault with Snitz, you yourself have stated that you have many pure Snitz which are much busier and have no problems, kind of prooves my point.
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 21 November 2004 :  07:02:02  Show Profile  Visit Gremlin's Homepage
Don't take what I've said the wrong way Huw, I'm not personaly saying nor do I even think I've inferred in this post that those particular objects Chris has found in core code are actually likely to cause much of a problem. I do still stand by what I've said about good coding practice though, theres a difference between intentionally not destroying an object and just forgetting to, by doing it all the time people get into the habit of doing it, which I think overall is a good thing. Memory manangement isn't just the realm of the server OS, Programmers should take it into consideration as well when developing their applications.

I did ask him to report any he found though becuase I thought you'd actually be interested in them regardless, I didn't actually know what he'd found myself until reading this thread.

lasers forum isn't a stock standard forum and I believe he has found some of the mods on some of the more critical pages like default.asp etc have had problems destroying objects. Time will tell he's made a bunch of changes and I'm already seeing his forum use quite a considerable chunk less memory than it was before (though it's not all that busy right now either so that may not be related to the changes he's made).

One thing I do know is that Chris and I will get to the bottom of it no matter how much effort it takes, and we'll report our findings back here for anyone interested.

Kiwihosting.Net - The Forum Hosting Specialists

Edited by - Gremlin on 21 November 2004 07:12:20
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 21 November 2004 :  17:29:41  Show Profile
This page popped up in google and appears helpful. It reminded me that with connection pooling and database objects the time the object remains active is quite long.

http://www.oekosoft.ch/services/asp-ado.html

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 21 November 2004 :  19:10:34  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Gremlin, this might help diagnose the problem.
The IIS Crash / Hang Agent should log errors in the event log.

http://www.microsoft.com/downloads/details.aspx?FamilyID=01c4f89d-cc68-42ba-98d2-0c580437efcf&DisplayLang=en

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

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 22 November 2004 :  00:29:32  Show Profile  Visit Gremlin's Homepage
That looks quite handy just to have installed, thanks for the link :) .. I also am quite fond of using something called IIStracer for assisting with debugging http://www.motobit.com/help/iistrace/default.htm


Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

sr_erick
Senior Member

USA
1318 Posts

Posted - 22 November 2004 :  01:38:31  Show Profile  Visit sr_erick's Homepage  Send sr_erick a Yahoo! Message
I've attempted to use IIS Crash / Hang. I couldn't figure it out. When I uninstalled it though, it seemed like everything speeded up quite a bit. If you figure out how to use it Gremlin, I'd sure be happy.




Erick
Snowmobile Fanatics

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 22 November 2004 :  04:22:31  Show Profile  Visit HuwR's Homepage
my experience of it was that it actually crashed more often with the crash/hang agent installed.

Before you do anything I would get the site running in SQL instead of Access, until you do that it isn't going to make the slightest bit of difference what you do, as Access is almost certainly the largest part of your problem
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 22 November 2004 :  05:27:49  Show Profile  Visit Gremlin's Homepage
Thanks for the heads up about IIS Crash / Hang.

So far the sites been humming along happily with just the general code tidy up that laser implemented yesterday.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous 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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07