?
Solved

Service WaitHint

Posted on 2003-03-18
3
Medium Priority
?
843 Views
Last Modified: 2007-12-19
Hi, it looks to me like the WaitHint property on a service application is ignored.

I set it to 500000 to be sure, but if I make a sleep(30000) somewhere in the service startup I will get a timeout - "The service is not responding to the control function" after about 30 seconds. How can I avoid this?

Regards,
Pede


0
Comment
Question by:pede
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
DaFox earned 500 total points
ID: 8158808
Hi pede.

Try to put that code into the OnExecute handler if it is in the OnStart handler atm. Another possibility would be to create a thread inside of the service.

Markus
0
 
LVL 1

Author Comment

by:pede
ID: 8158931
Hi, DaFox

I was doing the Sleep test before any of the events happened (in a contructor), moving it to either of those seems to fix it!
0
 
LVL 1

Author Comment

by:pede
ID: 8159686
Looks like I was a little too quick here :/

Doing a Sleep(30000) in onStart will prevent the service from starting, with a '...could not be started' error.

I guess I could try with a thread caling ReportStatus while the service is starting, but WaitHint should work...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question