View not being rendered for lengthy request but controller code exectuted

I have a complex action which can take a long time to run.

If it is run against a small subset of data it works perfectly and the required page is produced.

If I work with a large amount of data and the processing time goes above a few minutes the page still appears to be being requested on the client machine but we know (via a stack trace) that I'm right up to "return View(model);".

Any ideas why this might be happening? I am at a complete loss. I've triead extending every timeout to several hours (including any available for the app pool).

This cannot be a browser issue as it has been tried on several different windows pcs in Chrome, IE, Safari and Firefox.

EDIT

This happens in more than one place in the application where entirely different things are happening. But all the code is executed for both.

Answers


Before you call View(model) does your model actually have all of the expected data?

If you call ToList() on any IQuerable or IEnumerable properties, does it return the expected data?

You'll have to post a bit more code to go any further.


Edit:

Still not enough information to go on, but here are a few more debugging tips.

Your path is browser -> web server -> database

If you're certain that before you call View(model) that all of the data has been materialized in the model object, then you can assume that the problem is not in the webserver -> database connection.

So if the problem is between browser -> web server, here are a couple more possibilities:

  • you mention a big enterprise system: are there any proxies involved? Can you test with a direct connection?

  • is there anything being returned to the browser at all? Can you telnet to port 80 of the web server and issue the request? Do you get anything back?

  • if you monitor the browser process, is it doing anything? Using procexp, you can see what each thread is doing - is the browser idle, or is it using CPU & gobbling up memory?

  • are there any other processes that might be intercepting the request? Some anti-virus products may prevent certain pages from rendering. Can you disable the anti-virus and see if anything changes?

  • have you tried monitoring the server to see what is going on? Is processing happening (and presumably memory usage also goes up)?


Need Your Help

Unlike .Net Why the static member can be accessed by the instance in Java

c# java

All, Unlike C#, I found the static member can be accessed by the instance in Java. OK, I don't have any points for this. But actually it cause a problem. Let me explain it with a example.

Data Store for a Mac/iPhone Hybrid App

iphone cocoa macos core-data

I've been doing iPhone development for the last 5 months or so, and have been using Gus Mueller's FMDB for database interaction. My next project will have both a Mac and an iPhone application, and ...