473,395 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Memory leak in ASP.NET web site

I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In
order to save development effort, I've consolidated all database querying to
methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual values
(string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the memory
would be restored as soon as the web page response is finished, as I just
added another 512 MB of RAM to the server and there is never more than two
or three users hitting the site at the same time (there may be more users at
the same time, but within page load time frame there's never more than two
or three). I'm watching the Task Manager report memory usage skyrocketing
from 250 or so all the way up to 800MB in one user session, and it is never
restored until SQL Server and IIS services are restarted. SQL server takes
up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the
excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve individual
values from them now forcefully close the datareader (but not necessarily
the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but please
follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes
through all the objects in the connections and datareader ArrayLists in the
Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created with
a cache so that the data retrieved from the database would remain in memory
to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for some
reason, though I'm not sure. The development machine is running XP Pro and
the server is 2003. In any case, a person still cannot go through the entire
web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out what
the cause of this mess is. This is very important to me.

Please help, anybody!

Jon
Nov 18 '05 #1
19 1710
In your page_load function toss this at the end of it...

GC.Collect()

It's called a garbage collector (good name.)


"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In
order to save development effort, I've consolidated all database querying to methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual values
(string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the memory would be restored as soon as the web page response is finished, as I just
added another 512 MB of RAM to the server and there is never more than two
or three users hitting the site at the same time (there may be more users at the same time, but within page load time frame there's never more than two
or three). I'm watching the Task Manager report memory usage skyrocketing
from 250 or so all the way up to 800MB in one user session, and it is never restored until SQL Server and IIS services are restarted. SQL server takes
up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve individual
values from them now forcefully close the datareader (but not necessarily
the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but please follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes
through all the objects in the connections and datareader ArrayLists in the Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created with a cache so that the data retrieved from the database would remain in memory to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for some
reason, though I'm not sure. The development machine is running XP Pro and
the server is 2003. In any case, a person still cannot go through the entire web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out what the cause of this mess is. This is very important to me.

Please help, anybody!

Jon

Nov 18 '05 #2
See #5 of my post.

Jon

"ASP.Confused" <anonymous@> wrote in message
news:e$**************@TK2MSFTNGP11.phx.gbl...
In your page_load function toss this at the end of it...

GC.Collect()

It's called a garbage collector (good name.)


"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In order to save development effort, I've consolidated all database querying
to
methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual
values (string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the

memory
would be restored as soon as the web page response is finished, as I just added another 512 MB of RAM to the server and there is never more than two or three users hitting the site at the same time (there may be more users at
the same time, but within page load time frame there's never more than

two or three). I'm watching the Task Manager report memory usage skyrocketing from 250 or so all the way up to 800MB in one user session, and it is

never
restored until SQL Server and IIS services are restarted. SQL server takes up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of

the
excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve individual
values from them now forcefully close the datareader (but not necessarily the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but

please
follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes
through all the objects in the connections and datareader ArrayLists in

the
Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created

with
a cache so that the data retrieved from the database would remain in

memory
to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for some reason, though I'm not sure. The development machine is running XP Pro and the server is 2003. In any case, a person still cannot go through the

entire
web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out

what
the cause of this mess is. This is very important to me.

Please help, anybody!

Jon


Nov 18 '05 #3
Also make sure that if you have any references you don't need, to
dereference them.

"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In
order to save development effort, I've consolidated all database querying to methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual values
(string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the memory would be restored as soon as the web page response is finished, as I just
added another 512 MB of RAM to the server and there is never more than two
or three users hitting the site at the same time (there may be more users at the same time, but within page load time frame there's never more than two
or three). I'm watching the Task Manager report memory usage skyrocketing
from 250 or so all the way up to 800MB in one user session, and it is never restored until SQL Server and IIS services are restarted. SQL server takes
up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve individual
values from them now forcefully close the datareader (but not necessarily
the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but please follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes
through all the objects in the connections and datareader ArrayLists in the Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created with a cache so that the data retrieved from the database would remain in memory to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for some
reason, though I'm not sure. The development machine is running XP Pro and
the server is 2003. In any case, a person still cannot go through the entire web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out what the cause of this mess is. This is very important to me.

Please help, anybody!

Jon

Nov 18 '05 #4

"ASP.Confused" <anonymous@> wrote in message
news:Og**************@TK2MSFTNGP10.phx.gbl...
Also make sure that if you have any references you don't need, to
dereference them.


Thank you. But I am not that newbie, and unless I'm keeping things in the
Session or Application, all references get dereferenced when they fall out
of scope.

Jon
Nov 18 '05 #5
Sorry, had to cover all bases :)

Ok. I've only had this issue when I have had a runaway query (I still use
ADO in .NET)...but I wouldn't think that would be the problem.

You could try using SysInternals listdlls, which lists all the DLL's that
are being used by a specific application. It is a very useful tool, and
will tell you what dlls are using the most memory. This may point you in
the right direction.
"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eF*************@TK2MSFTNGP10.phx.gbl...
See #5 of my post.

Jon

"ASP.Confused" <anonymous@> wrote in message
news:e$**************@TK2MSFTNGP11.phx.gbl...
In your page_load function toss this at the end of it...

GC.Collect()

It's called a garbage collector (good name.)


"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page.
In
order to save development effort, I've consolidated all database querying
to
methods in a single static class, so whenever I need data, I pass a
SQL string to a method and I am passed a datareader or else individual

values (string, integer, etc).

There is a horrible memory leak in this application. Just one page load results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the

memory
would be restored as soon as the web page response is finished, as I just added another 512 MB of RAM to the server and there is never more than two or three users hitting the site at the same time (there may be more users
at
the same time, but within page load time frame there's never more than

two or three). I'm watching the Task Manager report memory usage skyrocketing from 250 or so all the way up to 800MB in one user session, and it is

never
restored until SQL Server and IIS services are restarted. SQL server takes up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the
excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve
individual values from them now forcefully close the datareader (but not necessarily the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but

please
follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes through all the objects in the connections and datareader ArrayLists
in the
Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created

with
a cache so that the data retrieved from the database would remain in

memory
to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for

some reason, though I'm not sure. The development machine is running XP Pro and the server is 2003. In any case, a person still cannot go through the

entire
web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out

what
the cause of this mess is. This is very important to me.

Please help, anybody!

Jon



Nov 18 '05 #6
Use the CLR profiler to find what is using the memory.

http://msdn.microsoft.com/library/de...nethowto13.asp

-John Oakes

"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In
order to save development effort, I've consolidated all database querying to methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual values
(string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the memory would be restored as soon as the web page response is finished, as I just
added another 512 MB of RAM to the server and there is never more than two
or three users hitting the site at the same time (there may be more users at the same time, but within page load time frame there's never more than two
or three). I'm watching the Task Manager report memory usage skyrocketing
from 250 or so all the way up to 800MB in one user session, and it is never restored until SQL Server and IIS services are restarted. SQL server takes
up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve individual
values from them now forcefully close the datareader (but not necessarily
the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but please follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes
through all the objects in the connections and datareader ArrayLists in the Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created with a cache so that the data retrieved from the database would remain in memory to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for some
reason, though I'm not sure. The development machine is running XP Pro and
the server is 2003. In any case, a person still cannot go through the entire web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out what the cause of this mess is. This is very important to me.

Please help, anybody!

Jon

Nov 18 '05 #7
"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In
order to save development effort, I've consolidated all database querying to methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual values
(string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the memory would be restored as soon as the web page response is finished, as I just
added another 512 MB of RAM to the server and there is never more than two
or three users hitting the site at the same time (there may be more users at the same time, but within page load time frame there's never more than two
or three). I'm watching the Task Manager report memory usage skyrocketing
from 250 or so all the way up to 800MB in one user session, and it is never restored until SQL Server and IIS services are restarted. SQL server takes
up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the excessive memory loss.


In another post you say that you're not a newbie, so I hope you don't find
the following insulting:

Are you losing virtual memory or physical memory? When the memory maxes out,
do you start paging?
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #8
You said that you are being passed a datareader. Are you closing it each
time?
"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In order to save development effort, I've consolidated all database querying
to
methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual
values (string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the

memory
would be restored as soon as the web page response is finished, as I just added another 512 MB of RAM to the server and there is never more than two or three users hitting the site at the same time (there may be more users at
the same time, but within page load time frame there's never more than
two or three). I'm watching the Task Manager report memory usage skyrocketing from 250 or so all the way up to 800MB in one user session, and it is

never
restored until SQL Server and IIS services are restarted. SQL server takes up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of

the
excessive memory loss.


In another post you say that you're not a newbie, so I hope you don't find
the following insulting:

Are you losing virtual memory or physical memory? When the memory maxes

out, do you start paging?
--
John Saunders
johnwsaundersiii at hotmail

Nov 18 '05 #9
When the page class deconstructs, yes, I have a manual closing method. See
first post.

Jon

"Steve" <st***@homeaccount.com> wrote in message
news:eH****************@TK2MSFTNGP09.phx.gbl...
You said that you are being passed a datareader. Are you closing it each
time?
"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page.
In
order to save development effort, I've consolidated all database querying
to
methods in a single static class, so whenever I need data, I pass a
SQL string to a method and I am passed a datareader or else individual

values (string, integer, etc).

There is a horrible memory leak in this application. Just one page load results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the

memory
would be restored as soon as the web page response is finished, as I just added another 512 MB of RAM to the server and there is never more than two or three users hitting the site at the same time (there may be more users
at
the same time, but within page load time frame there's never more than

two or three). I'm watching the Task Manager report memory usage skyrocketing from 250 or so all the way up to 800MB in one user session, and it is

never
restored until SQL Server and IIS services are restarted. SQL server takes up about 1/3 of the excessive memory loss, and IIS takes up about 2/3

of the
excessive memory loss.


In another post you say that you're not a newbie, so I hope you don't find the following insulting:

Are you losing virtual memory or physical memory? When the memory maxes

out,
do you start paging?
--
John Saunders
johnwsaundersiii at hotmail


Nov 18 '05 #10
Yes, it starts paging when total used ram reaches about 700-800MB. That's
when the app crashes. "Timeout while allocating memory." There is 768MB of
physical RAM installed.

Jon

"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In order to save development effort, I've consolidated all database querying
to
methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual
values (string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the

memory
would be restored as soon as the web page response is finished, as I just added another 512 MB of RAM to the server and there is never more than two or three users hitting the site at the same time (there may be more users at
the same time, but within page load time frame there's never more than
two or three). I'm watching the Task Manager report memory usage skyrocketing from 250 or so all the way up to 800MB in one user session, and it is

never
restored until SQL Server and IIS services are restarted. SQL server takes up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of

the
excessive memory loss.


In another post you say that you're not a newbie, so I hope you don't find
the following insulting:

Are you losing virtual memory or physical memory? When the memory maxes

out, do you start paging?
--
John Saunders
johnwsaundersiii at hotmail

Nov 18 '05 #11
I don't know how relevant this is, but I had a problem with a Windows
Service connecting to SQL Server that accumulated memory and later on
degraded the performance of the computer.
After about a week of hunting the problem, Closing and Disposing everything
I could lay my eyes on, I came upon some newsgroup with an article that
fixed it. In the Connection String of the Connection, I've added
"Connection Lifetime=1" . This influences the Connection Pooling, but hey,
it fixed my problem (which made me extremely grateful). The memory use
(private bytes) fluctuates between 130 and 150 MB and it has been purring
like a kitten for more than a month now on the client site.

"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In
order to save development effort, I've consolidated all database querying to methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual values
(string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the memory would be restored as soon as the web page response is finished, as I just
added another 512 MB of RAM to the server and there is never more than two
or three users hitting the site at the same time (there may be more users at the same time, but within page load time frame there's never more than two
or three). I'm watching the Task Manager report memory usage skyrocketing
from 250 or so all the way up to 800MB in one user session, and it is never restored until SQL Server and IIS services are restarted. SQL server takes
up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve individual
values from them now forcefully close the datareader (but not necessarily
the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but please follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes
through all the objects in the connections and datareader ArrayLists in the Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created with a cache so that the data retrieved from the database would remain in memory to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for some
reason, though I'm not sure. The development machine is running XP Pro and
the server is 2003. In any case, a person still cannot go through the entire web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out what the cause of this mess is. This is very important to me.

Please help, anybody!

Jon

Nov 18 '05 #12
now you've learned the danger of Datareaders. no component should return one
(as you can never trust the caller to release them). they should be created
and destroyed in the same method with a finally or use statement. change
your code to use datasets (which are much lighter and safer to store in
caches).

make the connection pool small to try to detect connection leaks.

try moving cleanup code to page unload

use devpartner to find the leak:

http://www.compuware.com/products/devpartner/studio.htm
-- bruce (sqlwork.com)


"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In
order to save development effort, I've consolidated all database querying to methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual values
(string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the memory would be restored as soon as the web page response is finished, as I just
added another 512 MB of RAM to the server and there is never more than two
or three users hitting the site at the same time (there may be more users at the same time, but within page load time frame there's never more than two
or three). I'm watching the Task Manager report memory usage skyrocketing
from 250 or so all the way up to 800MB in one user session, and it is never restored until SQL Server and IIS services are restarted. SQL server takes
up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve individual
values from them now forcefully close the datareader (but not necessarily
the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but please follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes
through all the objects in the connections and datareader ArrayLists in the Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created with a cache so that the data retrieved from the database would remain in memory to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for some
reason, though I'm not sure. The development machine is running XP Pro and
the server is 2003. In any case, a person still cannot go through the entire web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out what the cause of this mess is. This is very important to me.

Please help, anybody!

Jon

Nov 18 '05 #13
Thank you, Chris. I had high hopes for such an easy fix, but this still does
not resolve my problem at all.

Jon
"Chris Botha" <chris_s_botha@AT_h.o.t.m.a.i.l.com> wrote in message
news:u7**************@TK2MSFTNGP09.phx.gbl...
I don't know how relevant this is, but I had a problem with a Windows
Service connecting to SQL Server that accumulated memory and later on
degraded the performance of the computer.
After about a week of hunting the problem, Closing and Disposing everything I could lay my eyes on, I came upon some newsgroup with an article that
fixed it. In the Connection String of the Connection, I've added
"Connection Lifetime=1" . This influences the Connection Pooling, but hey, it fixed my problem (which made me extremely grateful). The memory use
(private bytes) fluctuates between 130 and 150 MB and it has been purring
like a kitten for more than a month now on the client site.

"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In order to save development effort, I've consolidated all database querying
to
methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual
values (string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the

memory
would be restored as soon as the web page response is finished, as I just added another 512 MB of RAM to the server and there is never more than two or three users hitting the site at the same time (there may be more users at
the same time, but within page load time frame there's never more than

two or three). I'm watching the Task Manager report memory usage skyrocketing from 250 or so all the way up to 800MB in one user session, and it is

never
restored until SQL Server and IIS services are restarted. SQL server takes up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of

the
excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve individual
values from them now forcefully close the datareader (but not necessarily the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but

please
follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes
through all the objects in the connections and datareader ArrayLists in

the
Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created

with
a cache so that the data retrieved from the database would remain in

memory
to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for some reason, though I'm not sure. The development machine is running XP Pro and the server is 2003. In any case, a person still cannot go through the

entire
web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out

what
the cause of this mess is. This is very important to me.

Please help, anybody!

Jon


Nov 18 '05 #14
Thank you bruce,
try moving cleanup code to page unload
I don't know if I fixed the problem, but the memory seems to be restored on
my development machine. I did the above ("> ") and Chris Botha's advice ..
will post here once I figure out which one did it, or whether both did it.

Jon

"bruce barker" <no***********@safeco.com> wrote in message
news:eo****************@TK2MSFTNGP10.phx.gbl... now you've learned the danger of Datareaders. no component should return one (as you can never trust the caller to release them). they should be created and destroyed in the same method with a finally or use statement. change
your code to use datasets (which are much lighter and safer to store in
caches).

make the connection pool small to try to detect connection leaks.

try moving cleanup code to page unload

use devpartner to find the leak:

http://www.compuware.com/products/devpartner/studio.htm
-- bruce (sqlwork.com)


"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In order to save development effort, I've consolidated all database querying
to
methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual
values (string, integer, etc).

There is a horrible memory leak in this application. Just one page load
results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the

memory
would be restored as soon as the web page response is finished, as I just added another 512 MB of RAM to the server and there is never more than two or three users hitting the site at the same time (there may be more users at
the same time, but within page load time frame there's never more than

two or three). I'm watching the Task Manager report memory usage skyrocketing from 250 or so all the way up to 800MB in one user session, and it is

never
restored until SQL Server and IIS services are restarted. SQL server takes up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of

the
excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve individual
values from them now forcefully close the datareader (but not necessarily the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but

please
follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes
through all the objects in the connections and datareader ArrayLists in

the
Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created

with
a cache so that the data retrieved from the database would remain in

memory
to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for some reason, though I'm not sure. The development machine is running XP Pro and the server is 2003. In any case, a person still cannot go through the

entire
web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out

what
the cause of this mess is. This is very important to me.

Please help, anybody!

Jon


Nov 18 '05 #15
On second thought, after a few minutes the memory came back .. this could be
it?

Jon
"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Thank you, Chris. I had high hopes for such an easy fix, but this still does not resolve my problem at all.

Jon
"Chris Botha" <chris_s_botha@AT_h.o.t.m.a.i.l.com> wrote in message
news:u7**************@TK2MSFTNGP09.phx.gbl...
I don't know how relevant this is, but I had a problem with a Windows
Service connecting to SQL Server that accumulated memory and later on
degraded the performance of the computer.
After about a week of hunting the problem, Closing and Disposing everything
I could lay my eyes on, I came upon some newsgroup with an article that
fixed it. In the Connection String of the Connection, I've added
"Connection Lifetime=1" . This influences the Connection Pooling, but

hey,
it fixed my problem (which made me extremely grateful). The memory use
(private bytes) fluctuates between 130 and 150 MB and it has been purring
like a kitten for more than a month now on the client site.

"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In order to save development effort, I've consolidated all database querying
to
methods in a single static class, so whenever I need data, I pass a
SQL string to a method and I am passed a datareader or else individual

values (string, integer, etc).

There is a horrible memory leak in this application. Just one page load results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the

memory
would be restored as soon as the web page response is finished, as I just added another 512 MB of RAM to the server and there is never more than two or three users hitting the site at the same time (there may be more users
at
the same time, but within page load time frame there's never more than

two or three). I'm watching the Task Manager report memory usage skyrocketing from 250 or so all the way up to 800MB in one user session, and it is

never
restored until SQL Server and IIS services are restarted. SQL server takes up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the
excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve
individual values from them now forcefully close the datareader (but not necessarily the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but

please
follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes through all the objects in the connections and datareader ArrayLists
in the
Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created

with
a cache so that the data retrieved from the database would remain in

memory
to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for

some reason, though I'm not sure. The development machine is running XP Pro and the server is 2003. In any case, a person still cannot go through the

entire
web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out

what
the cause of this mess is. This is very important to me.

Please help, anybody!

Jon



Nov 18 '05 #16
It could be it, in my case it fluctuates, goes up and comes down all the
time (the Windows Service does its thing every minute). Should be
interesting, let us know.

"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:uJ**************@TK2MSFTNGP09.phx.gbl...
On second thought, after a few minutes the memory came back .. this could be it?

Jon
"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Thank you, Chris. I had high hopes for such an easy fix, but this still does
not resolve my problem at all.

Jon
"Chris Botha" <chris_s_botha@AT_h.o.t.m.a.i.l.com> wrote in message
news:u7**************@TK2MSFTNGP09.phx.gbl...
I don't know how relevant this is, but I had a problem with a Windows
Service connecting to SQL Server that accumulated memory and later on
degraded the performance of the computer.
After about a week of hunting the problem, Closing and Disposing

everything
I could lay my eyes on, I came upon some newsgroup with an article that fixed it. In the Connection String of the Connection, I've added
"Connection Lifetime=1" . This influences the Connection Pooling, but

hey,
it fixed my problem (which made me extremely grateful). The memory use
(private bytes) fluctuates between 130 and 150 MB and it has been purring like a kitten for more than a month now on the client site.

"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
> I'm reposting this because I really need some advice.
>
> I have a web app that makes many queries to the database on every page.
In
> order to save development effort, I've consolidated all database

querying
to
> methods in a single static class, so whenever I need data, I pass a SQL > string to a method and I am passed a datareader or else individual

values
> (string, integer, etc).
>
> There is a horrible memory leak in this application. Just one page load > results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the
memory
> would be restored as soon as the web page response is finished, as I

just
> added another 512 MB of RAM to the server and there is never more than two
> or three users hitting the site at the same time (there may be more

users
at
> the same time, but within page load time frame there's never more
than
two
> or three). I'm watching the Task Manager report memory usage

skyrocketing
> from 250 or so all the way up to 800MB in one user session, and it
is never
> restored until SQL Server and IIS services are restarted. SQL server

takes
> up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the
> excessive memory loss.
>
> Here is what I have done to try to resolve this matter.
>
> 1. All generic functions that create datareaders to retrieve individual > values from them now forcefully close the datareader (but not

necessarily
> the connection).
>
> 2. All database connections and datareaders are stored into
ArrayList > objects which are stored in the Session. (Dangerous, I know! ... but
please
> follow me.)
>
> 3. All web pages that utilize these database functions inherit from a > CommonPage class. I have created a deconstructor in CommonPage that

goes > through all the objects in the connections and datareader ArrayLists in the
> Session and *closes* them and removes them from the ArrayLists.
>
> 4. An "AppUser" object, stored in the Session object, had been created with
> a cache so that the data retrieved from the database would remain in
memory
> to speed up page loads. The cache is now destroyed in the CurrentPage > deconstructor.
>
> 5. The garbage collector is executed in the deconstructor.
>
> Nothing is being stored in the Application collection.
>
> The end result of the above is SOME savings of RAM on the development > machine (about 20% less loss), but little no change on the server for some
> reason, though I'm not sure. The development machine is running XP
Pro and
> the server is 2003. In any case, a person still cannot go through

the entire
> web site (a web-based survey) without crashing the server.
>
> I have been pulling my hair out for a week or two trying to figure out what
> the cause of this mess is. This is very important to me.
>
> Please help, anybody!
>
> Jon
>
>



Nov 18 '05 #17
Really hard to tell. Task Manager is showing fluctuations. I do think BOTH
are helping a great deal. However, I still see 50MB loss after a 100MB-loss
test session.

Jon

"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:uL**************@tk2msftngp13.phx.gbl...
Thank you bruce,
try moving cleanup code to page unload
I don't know if I fixed the problem, but the memory seems to be restored

on my development machine. I did the above ("> ") and Chris Botha's advice ..
will post here once I figure out which one did it, or whether both did it.

Jon

"bruce barker" <no***********@safeco.com> wrote in message
news:eo****************@TK2MSFTNGP10.phx.gbl...
now you've learned the danger of Datareaders. no component should return one
(as you can never trust the caller to release them). they should be

created
and destroyed in the same method with a finally or use statement. change
your code to use datasets (which are much lighter and safer to store in
caches).

make the connection pool small to try to detect connection leaks.

try moving cleanup code to page unload

use devpartner to find the leak:

http://www.compuware.com/products/devpartner/studio.htm
-- bruce (sqlwork.com)


"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
I'm reposting this because I really need some advice.

I have a web app that makes many queries to the database on every page. In
order to save development effort, I've consolidated all database querying
to
methods in a single static class, so whenever I need data, I pass a
SQL string to a method and I am passed a datareader or else individual

values (string, integer, etc).

There is a horrible memory leak in this application. Just one page load results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the

memory
would be restored as soon as the web page response is finished, as I just added another 512 MB of RAM to the server and there is never more than two or three users hitting the site at the same time (there may be more users
at
the same time, but within page load time frame there's never more than

two or three). I'm watching the Task Manager report memory usage skyrocketing from 250 or so all the way up to 800MB in one user session, and it is

never
restored until SQL Server and IIS services are restarted. SQL server takes up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the
excessive memory loss.

Here is what I have done to try to resolve this matter.

1. All generic functions that create datareaders to retrieve
individual values from them now forcefully close the datareader (but not necessarily the connection).

2. All database connections and datareaders are stored into ArrayList
objects which are stored in the Session. (Dangerous, I know! ... but

please
follow me.)

3. All web pages that utilize these database functions inherit from a
CommonPage class. I have created a deconstructor in CommonPage that goes through all the objects in the connections and datareader ArrayLists
in the
Session and *closes* them and removes them from the ArrayLists.

4. An "AppUser" object, stored in the Session object, had been created

with
a cache so that the data retrieved from the database would remain in

memory
to speed up page loads. The cache is now destroyed in the CurrentPage
deconstructor.

5. The garbage collector is executed in the deconstructor.

Nothing is being stored in the Application collection.

The end result of the above is SOME savings of RAM on the development
machine (about 20% less loss), but little no change on the server for

some reason, though I'm not sure. The development machine is running XP Pro and the server is 2003. In any case, a person still cannot go through the

entire
web site (a web-based survey) without crashing the server.

I have been pulling my hair out for a week or two trying to figure out

what
the cause of this mess is. This is very important to me.

Please help, anybody!

Jon



Nov 18 '05 #18
You could try using SysInternals listdlls, which lists all the DLL's that
are being used by a specific application. It is a very useful tool, and
will tell you what dlls are using the ***most memory***. This may point you
in
the right direction, and it may even tell you what assembly is causing the
problems

(or you could also use Microsoft's CLR Profiler, which is free from
Microsoft.)


"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eJ**************@tk2msftngp13.phx.gbl...
Really hard to tell. Task Manager is showing fluctuations. I do think BOTH
are helping a great deal. However, I still see 50MB loss after a 100MB-loss test session.

Jon

"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:uL**************@tk2msftngp13.phx.gbl...
Thank you bruce,
try moving cleanup code to page unload
I don't know if I fixed the problem, but the memory seems to be restored

on
my development machine. I did the above ("> ") and Chris Botha's advice ...
will post here once I figure out which one did it, or whether both did it.
Jon

"bruce barker" <no***********@safeco.com> wrote in message
news:eo****************@TK2MSFTNGP10.phx.gbl...
now you've learned the danger of Datareaders. no component should return
one
(as you can never trust the caller to release them). they should be

created
and destroyed in the same method with a finally or use statement.
change your code to use datasets (which are much lighter and safer to store in caches).

make the connection pool small to try to detect connection leaks.

try moving cleanup code to page unload

use devpartner to find the leak:

http://www.compuware.com/products/devpartner/studio.htm
-- bruce (sqlwork.com)


"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
> I'm reposting this because I really need some advice.
>
> I have a web app that makes many queries to the database on every

page.
In
> order to save development effort, I've consolidated all database

querying
to
> methods in a single static class, so whenever I need data, I pass a

SQL > string to a method and I am passed a datareader or else individual

values
> (string, integer, etc).
>
> There is a horrible memory leak in this application. Just one page load > results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the
memory
> would be restored as soon as the web page response is finished, as I

just
> added another 512 MB of RAM to the server and there is never more than two
> or three users hitting the site at the same time (there may be more

users
at
> the same time, but within page load time frame there's never more
than
two
> or three). I'm watching the Task Manager report memory usage

skyrocketing
> from 250 or so all the way up to 800MB in one user session, and it
is never
> restored until SQL Server and IIS services are restarted. SQL server

takes
> up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the
> excessive memory loss.
>
> Here is what I have done to try to resolve this matter.
>
> 1. All generic functions that create datareaders to retrieve individual > values from them now forcefully close the datareader (but not

necessarily
> the connection).
>
> 2. All database connections and datareaders are stored into
ArrayList > objects which are stored in the Session. (Dangerous, I know! ... but
please
> follow me.)
>
> 3. All web pages that utilize these database functions inherit from a > CommonPage class. I have created a deconstructor in CommonPage that

goes > through all the objects in the connections and datareader ArrayLists in the
> Session and *closes* them and removes them from the ArrayLists.
>
> 4. An "AppUser" object, stored in the Session object, had been created with
> a cache so that the data retrieved from the database would remain in
memory
> to speed up page loads. The cache is now destroyed in the CurrentPage > deconstructor.
>
> 5. The garbage collector is executed in the deconstructor.
>
> Nothing is being stored in the Application collection.
>
> The end result of the above is SOME savings of RAM on the development > machine (about 20% less loss), but little no change on the server for some
> reason, though I'm not sure. The development machine is running XP
Pro and
> the server is 2003. In any case, a person still cannot go through

the entire
> web site (a web-based survey) without crashing the server.
>
> I have been pulling my hair out for a week or two trying to figure out what
> the cause of this mess is. This is very important to me.
>
> Please help, anybody!
>
> Jon
>
>



Nov 18 '05 #19
You could try using SysInternals listdlls, which lists all the DLL's that
are being used by a specific application. It is a very useful tool, and
will tell you what dlls are using the ***most memory***. This may point you
in
the right direction, and it may even tell you what assembly is causing the
problems

(or you could also use Microsoft's CLR Profiler, which is free from
Microsoft.)


"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eJ**************@tk2msftngp13.phx.gbl...
Really hard to tell. Task Manager is showing fluctuations. I do think BOTH
are helping a great deal. However, I still see 50MB loss after a 100MB-loss test session.

Jon

"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:uL**************@tk2msftngp13.phx.gbl...
Thank you bruce,
try moving cleanup code to page unload
I don't know if I fixed the problem, but the memory seems to be restored

on
my development machine. I did the above ("> ") and Chris Botha's advice ...
will post here once I figure out which one did it, or whether both did it.
Jon

"bruce barker" <no***********@safeco.com> wrote in message
news:eo****************@TK2MSFTNGP10.phx.gbl...
now you've learned the danger of Datareaders. no component should return
one
(as you can never trust the caller to release them). they should be

created
and destroyed in the same method with a finally or use statement.
change your code to use datasets (which are much lighter and safer to store in caches).

make the connection pool small to try to detect connection leaks.

try moving cleanup code to page unload

use devpartner to find the leak:

http://www.compuware.com/products/devpartner/studio.htm
-- bruce (sqlwork.com)


"Jon Davis" <jo*@REMOVE.ME.accentra.net> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
> I'm reposting this because I really need some advice.
>
> I have a web app that makes many queries to the database on every

page.
In
> order to save development effort, I've consolidated all database

querying
to
> methods in a single static class, so whenever I need data, I pass a

SQL > string to a method and I am passed a datareader or else individual

values
> (string, integer, etc).
>
> There is a horrible memory leak in this application. Just one page load > results in a loss of about 50 MB. I COULD LIVE WITH THIS if only the
memory
> would be restored as soon as the web page response is finished, as I

just
> added another 512 MB of RAM to the server and there is never more than two
> or three users hitting the site at the same time (there may be more

users
at
> the same time, but within page load time frame there's never more
than
two
> or three). I'm watching the Task Manager report memory usage

skyrocketing
> from 250 or so all the way up to 800MB in one user session, and it
is never
> restored until SQL Server and IIS services are restarted. SQL server

takes
> up about 1/3 of the excessive memory loss, and IIS takes up about 2/3 of the
> excessive memory loss.
>
> Here is what I have done to try to resolve this matter.
>
> 1. All generic functions that create datareaders to retrieve individual > values from them now forcefully close the datareader (but not

necessarily
> the connection).
>
> 2. All database connections and datareaders are stored into
ArrayList > objects which are stored in the Session. (Dangerous, I know! ... but
please
> follow me.)
>
> 3. All web pages that utilize these database functions inherit from a > CommonPage class. I have created a deconstructor in CommonPage that

goes > through all the objects in the connections and datareader ArrayLists in the
> Session and *closes* them and removes them from the ArrayLists.
>
> 4. An "AppUser" object, stored in the Session object, had been created with
> a cache so that the data retrieved from the database would remain in
memory
> to speed up page loads. The cache is now destroyed in the CurrentPage > deconstructor.
>
> 5. The garbage collector is executed in the deconstructor.
>
> Nothing is being stored in the Application collection.
>
> The end result of the above is SOME savings of RAM on the development > machine (about 20% less loss), but little no change on the server for some
> reason, though I'm not sure. The development machine is running XP
Pro and
> the server is 2003. In any case, a person still cannot go through

the entire
> web site (a web-based survey) without crashing the server.
>
> I have been pulling my hair out for a week or two trying to figure out what
> the cause of this mess is. This is very important to me.
>
> Please help, anybody!
>
> Jon
>
>



Nov 18 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark D. Anderson | last post by:
About a month ago Richard Cornford did an interesting analysis of a memory leak in jscript (internet explorer) when there are "circular" references between DOM objects and (real) jscript objects:...
8
by: ranjeet.gupta | last post by:
Dear All Is the Root Cause of the Memory corruption is the Memory leak, ?? suppose If in the code there is Memory leak, Do this may lead to the Memory Corruption while executing the program ? ...
4
by: Chris | last post by:
Hi, I have an asp.net site that receives a medium amount of traffic (500-1k users per day). I'm having massive trouble at the moment with a memory leak that I just cannot isolate. The server is...
7
by: Jon Davis | last post by:
OK I have a web app that I built that makes MANY calls to the DB in each request. The app wasn't tuned for scalability so this wasn't a problem, but time is too short to redesign how the database...
8
by: Lauren the Ravishing | last post by:
Hi, In ASP, is it absolutely necessary to set an object to Nothing after being used? set myObj = server.createObject("myDLL.myClass") call myObj.useClass set myObj = Nothing <--- can I...
2
by: rizjabbar | last post by:
I have a memory leak happening... I believe it is due to Dom parser... could anyone help me with this: Do I need a delete??? /////////////////////////////////////////////// //Code on Main HTML...
3
by: Jim Land | last post by:
Jack Slocum claims here http://www.jackslocum.com/yui/2006/10/02/3-easy-steps-to-avoid-javascript- memory-leaks/ that "almost every site you visit that uses JavaScript is leaking memory". ...
2
by: =?Utf-8?B?Tm9tYW4gQWxp?= | last post by:
Hi, We are facing a strange problem in our ASP. NET website. Some times it gives the following unhandled exception. Error Message: Exception of type System.Web.HttpUnhandledException was...
16
by: graham.keellings | last post by:
hi, I'm looking for an open source memory pool. It's for use on an embedded system, if that makes any difference. Something with garbage collection/defragmentation would be nice. It should have...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.