David
Fri Jan 19 00:47:25 CST 2007
Your questions are specific to the web application framework (i.e.
WebModule.OnCreate() ) that you are using. I suggest you pose your
question to the appropriate support forum of your application's
framework.
> Could someone tell me what eIse needs to be done so the instances
> terminate once the user exits the application/IE?
That is the default behavior of applications that run on IIS. If you do
not see it, it is usually a problem with the web application or the
framework used by the application.
Everything that runs on IIS is either a CGI EXE or ISAPI DLL.
- By default, IIS loads the ISAPI DLL once and reuses it for subsequent
requests, so any stranded EXE processes when executing an ISAPI DLL
originate from bugs in the application or its framework.
- IIS executes CGI EXEs by creating a new process for the EXE for every
request. The CGI EXE is supposed to terminate itself when it finishes
sending its response, but IIS5 does not enforce/kill CGI EXEs that
choose to hang around. Thus, stranded EXE processes indicate bugs in
the EXE application or its framework because it's supposed to terminate
itself when finished.
Furthermore, there is no direct correlation between closing a browser
and terminating a process on the server. Closing a browser may end the
TCP connection to the server, and the server may choose to tie a
process's lifetime to the TCP connection -- but this is not specified
in any specification and hence not guaranteed by IIS.
Thus, if you are having problems with EXEs hanging around, it's really
not due to IIS.
In particular, it sounds like the WebModule abstraction that you are
using is deliberately causing its host EXE to hang around. When you
"exit the application and close the browser", the WebModule is still
keeping its EXE around. I would figure out why this happens -- in the
support forum for "WebModule" application framework.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
vrijesh.jeswant@gmail.com wrote:
> Hello All,
> I built a web app using Borland Delphi 7 and deployed it using IIS.
> Everything is fine in terms of web access, but IIS seems to be creating
> a separate instance for each web module accessed in the app (most pages
> are separate delphi web modules with different functionality). These
> modules run in a virtual directory on IIS. After the application is
> exited and the browser is closed, the IIS instances remain. They keep
> piling up using about 5MB to 10MB of memory per instance. It requires a
> hard-boot to kill these instances.
>
> FYI:
> 1. WebModule.OnCreate sets the DB SqlConnection to active and the
> DBExpress SqlConn Object's Connected property is also set to True.
> WebModule.OnDestroy sets the db connection to false.
>
> 2. The virtual directory is currently set to run in Medium (pooled)
> isolation. I have tried all 3 - Low, Medium, and High, and everytime I
> just end up adding about 3 more instances.
>
> Could someone tell me what eIse needs to be done so the instances
> terminate once the user exits the application/IE?
>
> Environment: Windows 2000 Server with SP4, Oracle 9i db, IIS5.0
>
> Thanks,
> VJ