Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

browser timeouts while asp.net application keeps running

I'm encountering a situation where it takes a long time for ASP.NET to generate reply with the web page (more than 2 hours). It due to the codebehind running for a while (very long, slow loop).

Browser (both IE & Firefox) stops waiting for the reply (after about an hour) and gives generic cannot display webpage error (similar to what you would see if you'd try to navige to non-existing server).

At the same time asp.net app keeps going (I can see it in debugger) and eventually completes.

Why does this happen? Are there any settings in web.config to influence this? I'm hoping there's a timeout setting that I'm missing that's causing this.

Maybe a settings in IE or Firefox? But I think they wait while the server is keeping connection alive.

I'm experiencing this even when I launch app in debug mode (with compilation debug="true") on my local machine from VS (so it's not running on IIS, but on ASP.NET Dev Server).

I know it's bad that it takes so long to generate the page, but it doesn't matter at this stage. Speeding it up would take a lot of extra work and the delay doesn't really matter. This is used internally.

I realize I can redesign around this issue running logic to a background process and getting notified when it's done through AJAX, or pull it to a desktop app or service or whatever. Something along those lines will be done eventually, but that's not what I'm asking about right now.

like image 982
Sumrak Avatar asked Mar 11 '09 02:03

Sumrak


1 Answers

Sounds like you're using IE and it is timing out while waiting for a response from the server.

You can find a technet article to adjust this limit:

http://support.microsoft.com/kb/181050

CAUSE

By design, Internet Explorer imposes a time-out limit for the server to return data. The time-out limit is five minutes for versions 4.0 and 4.01 and is 60 minutes for versions 5.x, 6, and 7. As a result, Internet Explorer does not wait endlessly for the server to come back with data when the server has a problem. Back to the top

RESOLUTION

In general, if a page does not return within a few minutes, many users perceive that a problem has occurred and stop the process. Therefore, design your server processes to return data within 5 minutes so that users do not have to wait for an extensive period of time.

like image 52
ninj Avatar answered Nov 15 '22 02:11

ninj