473,397 Members | 2,068 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,397 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 1682
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 I have a local database created. I installed PHP...
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 to my friends to show off my <sarcasm>maad...
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 text floating. With IE, the text is not always...
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 fourth table to hold supplemental data that also...
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, and then placing breakpoints in the code so that i...
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 ? Need clarification. Any ideas ? using...
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 0 index, and used matrix. And it worked...
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 what's happening I can only enter 1 digit into the...
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 mistyping of standard PHP functions OR my own class...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.