Re: Singleton Objects Dying

From: Fred Hirschfeld (a_at_b.c)
Date: 03/24/05


Date: Thu, 24 Mar 2005 06:44:20 -0800

If you are creating entries in the App.config (or web.config for IIS hosted)
then post that <system.remoting>...</system.remoting> text from there. If
you are using a sample that is configuring through code then post that code
snippet so we can see how the initialization happens.

Try running the URL directly in a web browser with the "?WSDL" at the end of
the URL (without the quotes). This should show you any error that is being
returned by the system.

You should also evaluate your server code to see if there is a memory issue.
Note that IIS does have "features" in the application pool that could be
doing this on you. Are you running IIS 5.1 or IIS6? If 6, then take a look
at the application pool settings to get familiar with them. If IIS 5.1 then
you need to look at COM+ Component Services area for these but ONLY if you
have set the application to "High (Isolate)" which I would recommend so you
have control over your application performance.

How is the memory on the machine as clients are making the requests? Are
these requests heavy memory users and slow or are they fast?

Also what type of information is your singleton contain that is common
across calls? If there is nothing common then there should not be any
threading issues. You would only see threading issues if you are accessing
something common to the threads. I am assuming that you do have something
common and that is why you are using the Singleton, right?

Fred

"Ahmed" <ahmedbm@gmail.com> wrote in message
news:1111668902.591130.22910@g14g2000cwa.googlegroups.com...
> Not quite sure what to answer on that, basically followed instructions
> from a WROX book in VB.NET professional and they simply stated to
> create a class that inherits from MarshalByRefObject.
>
> Public Class Competition
> Inherits MarshalByRefObject
> Implements Competition.IComp
>
> >From the client i am initializing like this.
>
> Competition = CType(Activator.GetObject(GetType(Competition.IComp),
> "http://www.********.net/Competition/Competition.rem"),
> Competition.IComp)
>
> I am just not sure what type of remoting it is and it tends to die on
> me with miscelaneous exception calls, i have a feeling the objects are
> not getting destroyed. I tried overriding the
> InitializeLifetimeService() method returning a lease of 100 mins and
> also tried returning nothing. They both tend to die at the same time.
>
> Any suggestions on how i should be initialising this class so there is
> only one instance running at a time?
>



Relevant Pages

  • Re: iis6 w3wp.exe thread count gets high and wp becomes sluggish
    ... objects which do not have the right apartment model and threading ... IIS is a high performance web server ... I have a website that has 6 app pools. ... *** In order for this command to work properly, ...
    (microsoft.public.inetserver.iis)
  • Re: IIS6 on W2k3 DCs
    ... Common best practices for whom? ... But Small Business Server 2003 runs with IIS on our domain controller. ... >guide for W2k3 but have instead pointed to Microsoft's ...
    (Focus-Microsoft)
  • Re: IIS raises an exception when I use https to connect WCF servic
    ... initialization of the array is performed in function ... for IIS 5.1. ... You should report this issue to Microsoft PSS and open a support case. ...
    (microsoft.public.inetserver.iis.security)
  • Re: How do I trun off casini web server?
    ... you may also need to switch to a multiproc machine to detect threading ... Under Server, click "Use custom server". ... server, but when I publish it to the web, which is using IIS (ASP.NET ... I cannot figure out how to switch my dev environment back to IIS so I can ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: dll missing when debugging ASP.Net WebApp?
    ... So I have a couple of common projects are are reference by both a WinForm ... project and Web App project. ... * Press F5 to debug the app ... Restart IIS ...
    (microsoft.public.dotnet.framework.aspnet)