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

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_Start 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 1389
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******@hotmail.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_Start 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.microsoft.com> wrote in message
news:TP**************@cpmsftngxa06.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
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...
6
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...
5
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...
0
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...
6
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...
13
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...
2
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...
3
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
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"; }...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...

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.