Re: Problem in running .Net Service on a Quad Processor



Hi Willy,
The following is the code snippet that my Service Executes onStart
public static void Start( bool isConsole, string[] args )
{
try
{
AppDomain curr = AppDomain.CurrentDomain;
AppDomainSetup info = new AppDomainSetup();

info.ApplicationBase = curr.BaseDirectory;
info.ApplicationName = typeof( ServiceRuntime ).FullName;
info.ApplicationBase = curr.BaseDirectory;
info.ConfigurationFile =
curr.SetupInformation.ConfigurationFile.Replace( ".CmdLine.", "." );
info.ShadowCopyFiles = "false";

_domain = AppDomain.CreateDomain( info.ApplicationName,
curr.Evidence, info );
_runtime = (ServiceRuntime)_domain.CreateInstanceAndUnwrap(
typeof( ServiceRuntime ).Assembly.GetName().FullName,
typeof( ServiceRuntime ).FullName
);

_runtime.Init( isConsole );
_runtime._Start( args );
}
catch( Exception e )
{
throw;
}
}

In _Start I am creating a few threads...
for( int i = 0; i < nThreads; i++ )
{
t = new Thread ( new ThreadStart ( this.ThreadProc ) ) ;
t.Name = "Job Processor Engine Thread(" + i.ToString() + ")";
t.Start () ;
this.threads.Add ( t ) ;
}
and doing some db activites....
But why is this failing on a QuadProc machine and working well on other
machines? Is there some setting I need to tune/change? Please help...

Thanks & regards
Sunil

news:1168436578.229624.134380@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks Willy,
But what baffles me is that on my machine it does not give this timeout


Forget about the hw configuration and concentrate on the OnStart method, there is something
preventing it to return in a timely fashion? It's impossible for us to tell you what's
happening without seeing any code, so please show us at least how your OnStart looks like.

Willy.

.



Relevant Pages

  • Re: Problem in running .Net Service on a Quad Processor
    ... stringargs) ... typeof(ServiceRuntime).Assembly.GetName.FullName, ... It looks like you don't run this "Start" in another thread, that means that OnStart only returns to the SCM when Start returns. ... Now, if you DB activity takes more than 30 seconds, the SCM will get nervous and kill the "OnStart" thread and bail out. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Problem in running .Net Service on a Quad Processor
    ... The OnStart method calls the Start method. ... typeof(ServiceRuntime).FullName ... You should add tracing and logging to your methods, your exception handling should also ...
    (microsoft.public.dotnet.languages.csharp)