473,761 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.a spx) 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.as px 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.as px 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 2329
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.a spx) 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.as px 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.as px 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 IHttpAsyncHandl er
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.a spx) 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.as px 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.as px 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
6192
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 program within the IDE, and start it back up, when I click on the Host button, the entire IDE hangs. I created a quick test program to try and figure out where the problem was.. Basically i created a form and put a command button, and a mswinsock
12
2484
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 Python hanging up either from a shell, or by importing a module. This I would not consider a bug, but more on my inexperience with Python. If my code causes Python to just hang up, and not allowing me to break out with control-C or...
5
2359
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 management application written in C#. running on .NET Framework 1.1/W2K/IIS5. The application uses the Microsoft WebService Behavior to generate a tree of "folders" in a frame on the left hand side. The user can click on a "folder", and the contents...
5
2309
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 time ago, following the advice in http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/codecompilation.asp, I used aspnet_compiler.exe to compile my application. Soon thereafter, every
16
2603
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 gradual upgrade of my web programming skills from Classic ASP / VBS to ASP.NET / VB.NET. While the study of the language differences and all the new features in .NET has so far not been a traumatic experience, I am a bit shell-schocked after
9
2296
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 script I call exec to run a Windows process. If I press the submit button on the form repeatedly, exec starts and exit the process several times, but after 2-3 cycles, it starts the process, the process exits, but exec doesn't return, and it hangs...
0
1313
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 my myapplication.exe myapplication.exe then contacts db2 database and than generate response for http request. First time compilation goes smoothly but after first internal web server error (some bug in my application) command
0
1655
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 = xmlrpclib.Server("http://10.10.101.62:29500") print server.Connection_Request("roberto") the Python command line 'hangs' until I kill the server. Then, the correct output is suddenly displayed:
14
9326
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 have set up a timer that records time into global variable at the start of the request, it outputs three time values in seconds - right before session_start, right after session_start, and at the very end of the request. here's what it shows
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9925
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9811
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8814
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.