472,337 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

ASP.NET does strange things

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
6 1598
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: richard.bair | last post by:
Hi! I'm trying to setup up a web page that will eventually be hosted but I want to develop it locally. It will use PHP to hit a MySQL database. So...
1
by: Funduk | last post by:
Hello, So I've been playing with Python and Pygame for a while and I decided I wanted to make a real executable so I could send that stuff over...
1
by: Rod | last post by:
Hi, It happens something strange with IE 6 (not with N7, Mozilla...). I want a div with a background picture. Within it, I want a picture with a...
2
by: Julia Baresch | last post by:
Hi everyone, My database has 3 data tables with chained one-to-many relationships i.e. Table1 1-->Many ->Table2 1-->Many ->Table3 I added a...
0
by: Bruno van Dooren | last post by:
Hi all, i have a problem that i never experienced with VC6 or VC .NET 2002. i try to debug a dll by using a 3party app to load and use the dll,...
9
by: karthikbalaguru | last post by:
Hi, I wonder how the 'm' value is 10 in the program below . It should be 7. Further, it turns later to 11. Strange. :( How is it possible ? Why...
1
by: tiddwaylll | last post by:
I once had a matrix working like this matrix So, since its indexed with 0, I used them as matrix or matrix. Then the other day, I forgot the...
8
by: CD Tom | last post by:
I'm lost, I have a form with fields called time1 time2 that are set to standard format Auto decimal with nothing out of the ordinary but here's...
3
dlite922
by: dlite922 | last post by:
1. Code completion and Syntax checker: Don't know if this exists for perl. I'm a PHP developer and NuSphere PHPED does this quite nicely, no more...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.