Windows service automatic start

delphi
('Koncz Timea') #1

Hi.
We have problems with application server when it run as a windows service: at windows restart, it doesn’t start automatically as previous versions (build with Delphi 10.2 + RO 9.3.105.1351), only if I set service to automatic start with delayed start. For now we use Delphi 10.3 and RO 9.6.0.1405. I put into main project file as first instruction to write something into a file, but it seems it never reach to that point.

All I have is this message found in windows event viewer:
“The GNSAppserver 8099:test service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.”

xml:

Log Name:      System
Source:        Service Control Manager
Date:          4/4/2019 3:35:20 PM
Event ID:      7000
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      POS-PC
Description:
The GNSAppserver 8099:test service failed to start due to the following error: 
The service did not respond to the start or control request in a timely fashion.

Event Xml:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
    <EventID Qualifiers="49152">7000</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8080000000000000</Keywords>
    <TimeCreated SystemTime="2019-04-04T12:35:20.442474200Z" />
    <EventRecordID>8783</EventRecordID>
    <Correlation />
    <Execution ProcessID="576" ThreadID="580" />
    <Channel>System</Channel>
    <Computer>POS-PC</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="param1">GNSAppserver 8099:test</Data>
    <Data Name="param2">%%1053</Data>
  </EventData>
</Event>

Are there any issues or can you give me any tips or workaround to solve this problem?
Thank you.

0 Likes

(EvgenyK) #2

Hi,

You can increase ServicesPipeTimeout parameter as described in A service does not start, and events 7000 and 7011 are logged in the Windows event log article.

0 Likes