473,322 Members | 1,314 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,322 software developers and data experts.

IIS hangs the first time two requests are made for same page quick

It appears that IIS hangs the first time two requests are made for same page
in quick succession. Although it may very well be something else I'm doing
wrong.

I have a page (ViewDocument.aspx) that dynamically generates one or more
image tags. The source attribute of the image tag is another page
(ViewImage.aspx) that simply writes the image data to the response.

When I load ViewDocument.aspx for the first time, everything is fine as long
as it only generates one image tag. I can load it again, generating multiple
image tags, and everything is solid.

However if when I load ViewDocument.aspx the first time, and cause it to
generate multiple image tags, IIS hangs (actually needs to be restarted).

When the error occurs, I see that the ViewImage.aspx constructor is called
twice, but that the Page_Load is never called.

Is it possible that the first request is causing the ViewImage.aspx page to
be compiled and if the second request for that page comes before it's
finished being compiled that the whole thing goes off into the weeds?

Thanks,
Brad

Nov 18 '05 #1
2 2304
HTTP requests usually work in that you don't get a response until you
get a response... meaning that if I send a request to IIS for a page,
IIS makes me wait until it is done processing the page. I wait for
compilation to complete before I get a response.

If I have another request that happens simulatneously, it waits in a
queue until a response can be given.
Do you use a file stream to open an image file? If you do, that may be
where the problem is, depending on which value of the FileShare
enumeration you use. You open the file, which locks the file, and it
won't be released until the stream is closed... which if not done in
code, is done when the garbage collector annihilates the page.

Brad Quinn wrote:
It appears that IIS hangs the first time two requests are made for same page
in quick succession. Although it may very well be something else I'm doing
wrong.

I have a page (ViewDocument.aspx) that dynamically generates one or more
image tags. The source attribute of the image tag is another page
(ViewImage.aspx) that simply writes the image data to the response.

When I load ViewDocument.aspx for the first time, everything is fine as long
as it only generates one image tag. I can load it again, generating multiple
image tags, and everything is solid.

However if when I load ViewDocument.aspx the first time, and cause it to
generate multiple image tags, IIS hangs (actually needs to be restarted).

When the error occurs, I see that the ViewImage.aspx constructor is called
twice, but that the Page_Load is never called.

Is it possible that the first request is causing the ViewImage.aspx page to
be compiled and if the second request for that page comes before it's
finished being compiled that the whole thing goes off into the weeds?

Thanks,
Brad

Nov 18 '05 #2
Thanks Mike, you got me pointed in the right direction.

It turned out that the page I was deriving from implements IHttpAsyncHandler
and uses a custom thread pool (actually I think it's based on Mike
Woodring's).

Telling the page to process synchronously was enough to fix the problem (but
makes me wonder where else I might have problems).

Thanks again,
Brad

"Mike Newton" wrote:
HTTP requests usually work in that you don't get a response until you
get a response... meaning that if I send a request to IIS for a page,
IIS makes me wait until it is done processing the page. I wait for
compilation to complete before I get a response.

If I have another request that happens simulatneously, it waits in a
queue until a response can be given.
Do you use a file stream to open an image file? If you do, that may be
where the problem is, depending on which value of the FileShare
enumeration you use. You open the file, which locks the file, and it
won't be released until the stream is closed... which if not done in
code, is done when the garbage collector annihilates the page.

Brad Quinn wrote:
It appears that IIS hangs the first time two requests are made for same page
in quick succession. Although it may very well be something else I'm doing
wrong.

I have a page (ViewDocument.aspx) that dynamically generates one or more
image tags. The source attribute of the image tag is another page
(ViewImage.aspx) that simply writes the image data to the response.

When I load ViewDocument.aspx for the first time, everything is fine as long
as it only generates one image tag. I can load it again, generating multiple
image tags, and everything is solid.

However if when I load ViewDocument.aspx the first time, and cause it to
generate multiple image tags, IIS hangs (actually needs to be restarted).

When the error occurs, I see that the ViewImage.aspx constructor is called
twice, but that the Page_Load is never called.

Is it possible that the first request is causing the ViewImage.aspx page to
be compiled and if the second request for that page comes before it's
finished being compiled that the whole thing goes off into the weeds?

Thanks,
Brad

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: C. Alexander | last post by:
Im running a small server that seems to work fine outside the IDE as an exe, but within the IDE, when I run the program for the first time, i can start/stop the host many times. But I end the...
12
by: JD | last post by:
This is another Python problem, I think might be unrelated to the earlier bug I found, and eventually figured out how to report it to Sourceforge. This is related to a question I have about...
5
by: Ken Barrett | last post by:
I apologize in advance for cross-posting, but I have noted that others have experienced similar issues and was hoping that someone could help. Briefly, I am working on an ASP.NET content...
5
by: Loane Sharp | last post by:
Hi there I've got a hang of a problem ... I'm running the .NET framework (2.0.40903), SQL Server 2000 and SQL Express 2005 on Windows XP Pro on a pretty good and new IBM Thinkpad X41. Some...
16
by: TB | last post by:
Hi all: If you think that the following comments are absolute amateurish, then please bear with me, or simply skip this thread. A couple of months back I made the decision to initiate a...
9
by: a | last post by:
I already posted on this subject, but I have some more information that should make the issue clearer. Config: Apache 2.x, PHP 5.1.x, Windows XP Pro A php script processes a form. Inside this...
0
by: shiggy | last post by:
Hello, I am writing embeded application (actualy web aplication) but i have problem during precompilation There is a front page server that handles http requests and delivers those requests to...
0
by: Arno Stienen | last post by:
Perhaps I should be a bit more specific. When using this code to connect to a remote XML-RPC server (C++, xmlrpc++0.7 library): import xmlrpclib server =...
14
by: Sergei Shelukhin | last post by:
Hi. I have a session started in php and two browser windows (IE)/tabs (FF) open. In one window, I execute a very slow report, immediately after that, I execute a fast simple page in another. I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.