Automatic Service start up problem on Booting the System

G

Guest

Hi
I have a Service which has a problem Starting Automatic on the Boot up (other times when i start from the Services Dialog it starts fine), It gives me the following Error in the Event Viewer

1> Timeout (30000 milliseconds) waiting for the RTEC System Service service to connect.

2> The RTEC System Service service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.

I have tried the following Solutions

1> I have cleared the Event Log thinking it is full still the problem is Intermittent
2> I tried on a differnet computer it works fine, but other other computer (slower computer) which has Celeron processor has the start up Problem.

Can I try the Following,

can I run my service with "ngen.exe", will it fix the problem

Pls let me know if any one have any solutions to fix this problem

Thanks
Madhava
 
W

Willy Denoyette [MVP]

Madhava Patro said:
Hi,
I have a Service which has a problem Starting Automatic on the Boot up
(other times when i start from the Services Dialog it starts fine), It
gives me the following Error in the Event Viewer,

1> Timeout (30000 milliseconds) waiting for the RTEC System Service
service to connect.

2> The RTEC System Service service failed to start due to the following
error:
The service did not respond to the start or control request in a
timely fashion.

I have tried the following Solutions,

1> I have cleared the Event Log thinking it is full still the problem is
Intermittent.
2> I tried on a differnet computer it works fine, but other other computer
(slower computer) which has Celeron processor has the start up Problem.

Can I try the Following,

can I run my service with "ngen.exe", will it fix the problem,

No, you problem is that your startup code (OnStart method)takes to much
time, this method should return within 30 seconds otherwise the SCM will
flag the services as failed on starting. One possible solution is to run
statup code on a separate thread and return as soon as the thread is
started.

Something like this should do....
....
protected override void OnStart(string[] args)
{
// this method should return within 30 sec.
Thread t= new Thread(new ThreadStart(xxxxxxx)); // execute startup
code in xxxxxxx
t.IsBackground = true;
t.Start();
return; // return to SCM
}

WIlly.
 
G

Guest

Thanks Willy, I forget to mention in my last mail but I already Running all the code in a different thread (from OnStart method

Does any one have any more suggestions

Thanks
Madhava
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top