473,765 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Server process lifetime

I have an application that has a web interface but also provides a direct
TCP interface for some older systems. In IIS5, I used to just spawn a
thread in Application_Sta rt and clean it up when the app ended, and it
seemed to work fine. In IIS6 (winxp pro dev for a target of win2k3
production), it seems to be more aggressive about cleaning up apps and
generally have odd behavior when I spawn threads.

Am I doing something really wrong here? Should I be remoting everything
into a service and just sucking up the performance loss?
Nov 18 '05 #1
5 1400
Hi Max,

From your description, you're using a background thread in ASP.NET web
application to listening for TCP port? And found that it works well when
you host the web app on machine with IIS5 BUT encounters some strange
behavior on IIS6 WIN2K3,yes?

Since you mentioned that you use a winxp pro dev machine for target win2k3
server, did you found the problem on winxp pro box or the win2k3 product
server? The WINxp pro machine has a limitaion to 10 max tcp connections, so
would you provide some further description on what it does in your separate
background thread in the asp.net app?
Also, what's the detailed info on the strange behavior you encountered, is
there any error info ? Generally, I think it's ok to use a background
thread in asp.net apps if we just do some lightweight tasks in it.

If you have any other questions or findings ,please also feel free to post
here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Nov 18 '05 #2
Hi Max:

Just thought of this: Check in the IIS MMC underneath the Application
Pool for your web application. Check Properties -> Recycling to see
how often the application is set to recycle, and (probably more
important), check Properties -> Performance to see if the application
should shut down after an idle period. If there are no requests coming
in for a period of time the application might just shutting down on
you. The approach you are using should still work, but a background
thread listening on a TCP socket won't keep it alive.

--
Scott
http://www.OdeToCode.com/

On Mon, 4 Oct 2004 16:40:52 -0400, "Max Metral" <me******@hotma il.com>
wrote:
I have an application that has a web interface but also provides a direct
TCP interface for some older systems. In IIS5, I used to just spawn a
thread in Application_Sta rt and clean it up when the app ended, and it
seemed to work fine. In IIS6 (winxp pro dev for a target of win2k3
production), it seems to be more aggressive about cleaning up apps and
generally have odd behavior when I spawn threads.

Am I doing something really wrong here? Should I be remoting everything
into a service and just sucking up the performance loss?


Nov 18 '05 #3
Thanks for the quick reply. I'm having two sorts of strange behavior.
These problems are all on the XP Pro box at the moment, but it has no load,
so I should be under the limit.

First, I'm connecting to MSN using the dotmsn library, and when running in
IIS, I get this strange TCP error:
WSAECONNABORTED -- Software caused the connection to abort. A connection
that has been made was aborted, usually due to connection or protocol error.

Now I would normally say there's something wrong with the library I'm using,
and that's certainly still possible. But it works fine, reliably, from a
console app using the same code.

Also, after some period of idle time, the app unloads. I need it to stick
around indefinitely, and I'm not sure how or if I can do this in IIS...

"Steven Cheng[MSFT]" <v-******@online.m icrosoft.com> wrote in message
news:TP******** ******@cpmsftng xa06.phx.gbl...
Hi Max,

From your description, you're using a background thread in ASP.NET web
application to listening for TCP port? And found that it works well when
you host the web app on machine with IIS5 BUT encounters some strange
behavior on IIS6 WIN2K3,yes?

Since you mentioned that you use a winxp pro dev machine for target win2k3
server, did you found the problem on winxp pro box or the win2k3 product
server? The WINxp pro machine has a limitaion to 10 max tcp connections,
so
would you provide some further description on what it does in your
separate
background thread in the asp.net app?
Also, what's the detailed info on the strange behavior you encountered, is
there any error info ? Generally, I think it's ok to use a background
thread in asp.net apps if we just do some lightweight tasks in it.

If you have any other questions or findings ,please also feel free to post
here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Nov 18 '05 #4
Hi Max,

Thanks for your followup.
As the first strange thing you mentioned, normally when some thing got
wrong in asp.net web app but works in console or desktop apps, we could
first check security issue. So in spite of the dotmsn library's problem, we
can try changing the asp.net's process identity to SYSTEM ACCOUNT in the
machine.config file and perform the same test to see whether it helps.

And regarding on the second problem that app unload, Scott has mentioend
the idle restart setting in Application Pool under IIS6 win2k3 server. As
for winxp or 2k iis5, there is no Application Pool setting , but there
seems to have another issue on the asp.net worker process restart after
some certain idle period:

#The ASP.NET worker process restarts before the timeout setting has lapsed
http://support.microsoft.com/?id=841557

Please have a look, if there is any other questions, please feel free to
post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #5
Hi Max,

Have you got any further ideas or progress on this issue? If there is
anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #6

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

Similar topics

15
4490
by: Michael Rybak | last post by:
hi, everyone. I'm writing a 2-players game that should support network mode. I'm now testing it on 1 PC since I don't have 2. I directly use sockets, and both client and server do computations, the only data transfered is user mouse/kbd input. It works synchronously, but somehow, when I play in client window, both client and server have 17 fps, while when playing in server window, server has 44 fps while client ...
6
3205
by: m | last post by:
Hello, I have an application that processes thousands of files each day. The filenames and various related file information is retrieved, related filenames are associate and placed in a linked list within a single object, which is then placed on a stack(This cuts down thread creation and deletions roughly by a factor of 4). I create up to 12 threads, which then process a single object off of the stack. I use a loop with a boolean...
5
7406
by: Tom | last post by:
Hi I am trying to transfer to a different .ASPX page using Server.Transfer. However, I get the following error: "Error executing child request for .aspx." Anyone know why? Thanks for help.
0
1283
by: Phinneas | last post by:
Howdy, I have multiple apps running on a pair of dual-processor Win2k IIS servers, neither of which are domain controllers. My users are experiencing fairly frequent (10-20 / day) "Server Application Unavailable" errors. I'm using a custom "Server Application Unavailable" page to send me an email whenever this occurs. I also have a ProcessHistory page that leverages ProcessModelInfo.GetHistory() to show me what's going on at the...
6
2560
by: John J. Hughes II | last post by:
I have an application that connects to an SQL server. I need to be able to disconnect all connection that I opened. I am closing and disposing the connection but the connection pool is keeping them alive for later use. How do I convince the connection pool to drop the connections without closing my program. Regards, John
13
1895
by: José Joye | last post by:
Hello, What is the best way to stop a remoting server (Singleton SAO) that has been started with RemotingConfiguration.Configure(). For sure, I want to do this without quitting the application :-) In fact, at a given time based on an internal event, I would like to stop the remoting functionality within my process. Many thanks,
2
3239
by: Dax | last post by:
Does anyone know if there's a means by which I can invoke a Process.Start, then detach the process from the calling process. I suppose in a nutshell I'm asking if there's a way I can add the new process to the "explorer" process. Thanks!
3
1565
by: mario semo | last post by:
Hello, What does the C++ Norm says about the lifetime of compiler generated temporary variables? #include <stdio.h> class BaseRef { //--------------------------------------------------------------------------
5
1481
by: Juha Nieminen | last post by:
Let's assume we have a class like this: //--------------------------------------------------------- #include <iostream> class MyClass { public: MyClass() { std::cout << "constructor\n"; } ~MyClass() { std::cout << "destructor\n"; }
0
10007
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
9959
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
8833
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...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
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
5277
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...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3926
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
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.