BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Avoiding multiple Instances of web application EXE in IIS

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Jan 18, 2007 9:54 pm    Post subject: Avoiding multiple Instances of web application EXE in IIS Reply with quote



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
Back to top
Steve Schofield
Guest





PostPosted: Fri Jan 19, 2007 6:49 am    Post subject: Re: Avoiding multiple Instances of web application EXE in II Reply with quote



You might want to check This is more an ITPro newsgroup

microsoft.public.inetsdk.programming.components.dev group.
microsoft.public.platformsdk.complus_mts
microsoft.public.platformsdk.component_svcs

--

Steve Schofield
Windows Server MVP - IIS
ASPInsider Member - MCP

http://www.orcsweb.com/
Managed Complex Hosting
#1 in Service and Support

<vrijesh.jeswant (AT) gmail (DOT) com> wrote in message
news:1169135656.885996.259510 (AT) v45g2000cwv (DOT) googlegroups.com...
Quote:
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
Back to top
David Wang
Guest





PostPosted: Fri Jan 19, 2007 9:11 am    Post subject: Re: Avoiding multiple Instances of web application EXE in II Reply with quote



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.

Quote:
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 (AT) gmail (DOT) com wrote:
Quote:
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
Back to top
Guest






PostPosted: Mon Jan 22, 2007 8:32 pm    Post subject: Re: Avoiding multiple Instances of web application EXE in II Reply with quote

Hi All,

I figured out that the WebModule.OnCreate and .OnDestroy had code to
open and close the data connections which, for some reason, was causing
the instances to remain, because once I copied the code into each
module, the instances have cleared up.

VJ
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.