By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,501 Members | 1,678 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,501 IT Pros & Developers. It's quick & easy.

ASP.NET does strange things

P: n/a
I have an application that has been working just fine for a couple of years.
It queries a SQL database and returns some formatted data back to the client.
I have a new client, who has a larger database than any of our previous
customers. For example, the query to build the datatable now takes about 2
minutes instead of one minute or less. This is a third party database we are
integrating with. He is getting very strange results. For example, when
running the web page, after a couple of minutes it may come back and ask him
to login to the web page again, this may happen several times in a row.
After this, he may get the results, or he may get an out of memory error, or
some other error indicating that the the page should never have even started
executing (my own error). The server the customer is running on has 2 .5 gig
of memory and w3wp only uses about 90meg before these errors happen.

So I got the customer database and am attempting to address the issues.
However, I also get very strange results. I can point my app at a small
database (only takes a few seconds). However, when I point it at their large
one (3.5 to 4 minuets to run), the web page eventually comes back with an
Action Canceled message after about 10+ minutes. In attempting to debug
this, it appears that the web page takes about 3.5 to 4 minutes to run.
However, after executing and getting the result set back from SQL (not very
large only about 1800 rows or a few hundred bytes each), the page appears to
reload two more times. I noticed this first in SQL Profiler because I could
see the same SQL statements getting executed over again. If I break in the
debugger at the Page_Load function, it does actually get executed 3 times.
After the third time I get the Action Cancelled error. In running the
shorter pages, the page_load function executes only once.

Can someone point in the right direction? I have increased the timeouts
(both SQL and ASP.NET) to 15 minutes. I am pretty sure this is not a problem
as prior customers have run into these timeout issues and my code changes
worked for them.

I am assuming there is some memory issue going on, but I have no idea how to
debug it or track it down.

Gary
Nov 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
I did some additional testing and just disabled all the code in the page and
just had the page_load function go to sleep. It appears that after about
140-150 seconds the page will reload once it finishes, instead of just
finished and terminating. If I have the page sleep for less than 140 seconds
it will always finish properly.
Nov 19 '05 #2

P: n/a
Hi Gary,

Welcome to ASPNET newsgroup.
From your description, one of your asp.net web application which runs well
for couple of years come into strange behavior recently after including a
large database into the backend db, yes?

Based on the information you mentioned:

=====================
He is getting very strange results. For example, when
running the web page, after a couple of minutes it may come back and ask
him
to login to the web page again, this may happen several times in a row.
After this, he may get the results, or he may get an out of memory error,
or
some other error indicating that the the page should never have even
started
executing (my own error).
=====================

I'm a bit confused at the "login to the web page again" you mentioned,
what's the "login" means here? Do it means the Integried windows
authentiation's login dialog or your custom Forms Authentication's login
page? Anway, I'm curently also thinking the problem is caused by the
long-time consuming task when interacting with the large db.(As you also
have simulated a long-time task through Thread.Sleep and get other strange
behaviors).

Would you also try using the ASP.NET's Trace to output some statement to
ensure that when doing such a long-run task, the page_load will excute
multi-times?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #3

P: n/a
I have verified the page loads multiple by actually running the page in the
debugger. I have the debugger setup to stop at the Page_Load function.
After the first time it hits the breakpoint, I run it and if the page takes
over 140s, it hits the breakpoint again (in the page_load function).

"Steven Cheng[MSFT]" wrote:
Hi Gary,

Welcome to ASPNET newsgroup.
From your description, one of your asp.net web application which runs well
for couple of years come into strange behavior recently after including a
large database into the backend db, yes?

Based on the information you mentioned:

=====================
He is getting very strange results. For example, when
running the web page, after a couple of minutes it may come back and ask
him
to login to the web page again, this may happen several times in a row.
After this, he may get the results, or he may get an out of memory error,
or
some other error indicating that the the page should never have even
started
executing (my own error).
=====================

I'm a bit confused at the "login to the web page again" you mentioned,
what's the "login" means here? Do it means the Integried windows
authentiation's login dialog or your custom Forms Authentication's login
page? Anway, I'm curently also thinking the problem is caused by the
long-time consuming task when interacting with the large db.(As you also
have simulated a long-time task through Thread.Sleep and get other strange
behaviors).

Would you also try using the ASP.NET's Trace to output some statement to
ensure that when doing such a long-run task, the page_load will excute
multi-times?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4

P: n/a
In doing some further work I have discovered something a bit different. When
I run this page independent of any other page, it works fine for an unlimited
period of time. However, this page gets called from another page. How it
gets called is the user clicks on a button in another frame of the page, then
the asp.net creates a form and adds a line of javascript to submit the form
wiht the target being the bottom frame. Is this the correct way to do this.
I want the original form with a bunch of options to show up in the top frame,
but then the bottom frame to have the output from the report. I guess I am
not doing this corretly. Is there a better way to switch the frame that is
being executed?

Nov 19 '05 #5

P: n/a
I discovered that for some reason, the client was resending the post to the
server. by adding a Response.Flush to the beginning of the Page_Load
function, the client no longer sends the request again.
Nov 19 '05 #6

P: n/a
Thanks for your further followup Gary,

Then, when you adding all the code you removed earilier back , does the
problem also went away? If so, I think that was the cause you found. If
anything else we can help, please feel free to post here. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.