Subject | Firebird service not stopping |
---|---|
Author | stegt |
Post date | 2010-05-28T15:39:51Z |
Hi,
I am trying to write a service that controls our application services and the firebird service in Windows.
ServiceA: controller
Firebird: Firebird DB service
ServiceB: our service
ServiceC: our service
ServiceA is set as automatic startup, and all the others are manual startup.
When ServiceA starts, it starts the Firebird service, then ServiceB and ServiceC. It always waits till the previous service had started before starting the next one.
The problem I have is that when shutting down ServiceA, it shuts down ServiceC, and ServiceB, then shuts down Firebird. More often than not, the Firebird service goes into a 'Stopping' state, but never actually stops, and fbserver.exe stays in the process list until terminated manually.
I have found that if I put a 1 second pause between shutting down ServiceB and Firebird, then Firebird usually shuts down normally, so I can only assume there is an something happening in Firebird when all the connections terminate, and it is still doing something when I try to shut down the service making it crash.
If this is the case, ideally I need to know if the time taken to do whatever it is doing is likely to be different on different size databases, different specifications of server etc, as I wan't to avoid having a hardcoded amount of time to wait before attempting a Firebird shutdown in case it isn't long enough for some servers.
Thanks in advance.
I am trying to write a service that controls our application services and the firebird service in Windows.
ServiceA: controller
Firebird: Firebird DB service
ServiceB: our service
ServiceC: our service
ServiceA is set as automatic startup, and all the others are manual startup.
When ServiceA starts, it starts the Firebird service, then ServiceB and ServiceC. It always waits till the previous service had started before starting the next one.
The problem I have is that when shutting down ServiceA, it shuts down ServiceC, and ServiceB, then shuts down Firebird. More often than not, the Firebird service goes into a 'Stopping' state, but never actually stops, and fbserver.exe stays in the process list until terminated manually.
I have found that if I put a 1 second pause between shutting down ServiceB and Firebird, then Firebird usually shuts down normally, so I can only assume there is an something happening in Firebird when all the connections terminate, and it is still doing something when I try to shut down the service making it crash.
If this is the case, ideally I need to know if the time taken to do whatever it is doing is likely to be different on different size databases, different specifications of server etc, as I wan't to avoid having a hardcoded amount of time to wait before attempting a Firebird shutdown in case it isn't long enough for some servers.
Thanks in advance.