Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Bad practices

Reply
Thread Tools

Bad practices

 
 
James Baker
Guest
Posts: n/a
 
      07-13-2004
I recently started working for a company and I'm obviously working with some
existing pages. I've noticed that a few things that concern me, but I'm not
necessarily sure of the implications.

1.) They use Session variables for almost everything. Some are never even
used, others could be handled in more efficient ways. They don't use them
for objects, just for a *ton* of variables. Will this present a problem?

2.) Connections aren't closed. There are several pages that have
connections that never end up closing. Are these connections released when
the end user shuts the browser, or could this result in the machine growing
slower over time and ultimately needing to be shut down?

The reason I ask these questions is, they end up shutting down the server at
least once every two days because the sites lock up and nothing works
properly. Something is gradually causing it to go down. It isn't really my
place to say anything, but if I could offer some suggestions to them, it'd
be worthwhile to me. Any thoughts?

Thanks,
James


 
Reply With Quote
 
 
 
 
Mark Schupp
Guest
Posts: n/a
 
      07-13-2004
Session variables use server memory so they will affect the scalability of
the site. If the site is only moderately loaded then session variables
should not be causing the problem. However, if a session variable is not
"necessary" then it should not be created. Heavily loaded sites may need to
take measures to eliminate all session variables through the use of cookies
and/or databases.

Unclosed connections are "supposed" to be closed when the variable
containing them goes out of scope. They are often associated with
performance problems and server-hangs. My rule is that "If you open it,
close it. If you create it, delete it".

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"James Baker" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I recently started working for a company and I'm obviously working with

some
> existing pages. I've noticed that a few things that concern me, but I'm

not
> necessarily sure of the implications.
>
> 1.) They use Session variables for almost everything. Some are never

even
> used, others could be handled in more efficient ways. They don't use them
> for objects, just for a *ton* of variables. Will this present a problem?
>
> 2.) Connections aren't closed. There are several pages that have
> connections that never end up closing. Are these connections released

when
> the end user shuts the browser, or could this result in the machine

growing
> slower over time and ultimately needing to be shut down?
>
> The reason I ask these questions is, they end up shutting down the server

at
> least once every two days because the sites lock up and nothing works
> properly. Something is gradually causing it to go down. It isn't really

my
> place to say anything, but if I could offer some suggestions to them, it'd
> be worthwhile to me. Any thoughts?
>
> Thanks,
> James
>
>



 
Reply With Quote
 
 
 
 
Jeff Cochran
Guest
Posts: n/a
 
      07-13-2004
On Tue, 13 Jul 2004 15:33:18 -0400, "James Baker"
<(E-Mail Removed)> wrote:

>I recently started working for a company and I'm obviously working with some
>existing pages. I've noticed that a few things that concern me, but I'm not
>necessarily sure of the implications.
>
>1.) They use Session variables for almost everything. Some are never even
>used, others could be handled in more efficient ways. They don't use them
>for objects, just for a *ton* of variables. Will this present a problem?


Maybe. Maybe not. I can't see the code or the system from my desk.
Have they ever caused a problem? Did you ask why things are the way
they are?

>2.) Connections aren't closed. There are several pages that have
>connections that never end up closing. Are these connections released when
>the end user shuts the browser, or could this result in the machine growing
>slower over time and ultimately needing to be shut down?


Released on a number of occasions, session ending, timeouts, etc. But
should always be closed.

>The reason I ask these questions is, they end up shutting down the server at
>least once every two days because the sites lock up and nothing works
>properly. Something is gradually causing it to go down. It isn't really my
>place to say anything, but if I could offer some suggestions to them, it'd
>be worthwhile to me. Any thoughts?


The items you mention may have nothing to do with the server locking
up, and there are many possibilities that you haven't mentioned.
Without a lot more detail, we can't diagnose their problems. Nor
probably is it our responsibility unless they ask.

Jeff
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
integer >= 1 == True and integer.0 == False is bad, bad, bad!!! rantingrick Python 44 07-13-2010 06:33 PM
Bad media, bad files or bad Nero? John Computer Information 23 01-08-2008 09:17 PM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 12 02-23-2005 03:28 AM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 0 02-19-2005 01:10 AM



Advertisments