The StartService function needs to return before the service will fully start. The service control manager will timeout after a certain amount of time if the StartService function doesn’t return. If service control manager reporting that there was an error starting the service?
As Adam states, you cannot put the periodic process in the OnStart function, otherwise it will never start. That function is supposed to run only once when the service is started and cannot have much delay. The way to perform what you want is by setting a Timer (of 10 seconds in your case) and attach an EventHandler routine so it will execute periodically when triggered at that interval.