ASP.NET does strange things

Discussion in 'ASP .Net' started by =?Utf-8?B?R2FyeQ==?=, May 3, 2005.

  1. 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
     
    =?Utf-8?B?R2FyeQ==?=, May 3, 2005
    #1
    1. Advertising

  2. 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.
     
    =?Utf-8?B?R2FyeQ==?=, May 4, 2005
    #2
    1. Advertising

  3. 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.)
     
    Steven Cheng[MSFT], May 4, 2005
    #3
  4. 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.)
    >
    >
     
    =?Utf-8?B?R2FyeQ==?=, May 4, 2005
    #4
  5. 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?
     
    =?Utf-8?B?R2FyeQ==?=, May 4, 2005
    #5
  6. 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.
     
    =?Utf-8?B?R2FyeQ==?=, May 4, 2005
    #6
  7. 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.)
     
    Steven Cheng[MSFT], May 5, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alexey Smirnov

    IIS Security strange things

    Alexey Smirnov, Mar 1, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    1,843
    Alexey Smirnov
    Mar 3, 2004
  2. Replies:
    1
    Views:
    882
    Harish
    Jan 7, 2005
  3. Toby A Inkster

    OT: strange things that people search for

    Toby A Inkster, Feb 8, 2004, in forum: HTML
    Replies:
    10
    Views:
    707
    Matthias Gutfeldt
    Feb 9, 2004
  4. Funduk
    Replies:
    2
    Views:
    555
    Flash
    May 29, 2012
  5. =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=

    vs2005 publish website doing bad things, bad things

    =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=, Oct 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    617
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Oct 25, 2006
Loading...

Share This Page