Skip to content

Improve Windows Service Support #5255

@timothycoleman

Description

@timothycoleman

Customers can currently (24.10.6+ and in the future (25.0.2+, 25.1.0+) install KurrentDB as a windows service and configure the SCM (service control manager) to restart it if it exits. But there are limitations:

  • If the service takes more than 30s to start, then it times out and there is no retry. Typically it only takes a second or two, and it is not dependent on database size, but a customer has seen it timeout in their test environment after a machine restart.
  • When going offline for truncation it is not restarted (presumably because it was a successful controlled shutdown)
  • When i shut the server down through the web ui it did restart, which is curious given the above.

We ought to address these concerns but they will likely not be trivial.

In the mean time the advice to customers is to run use a scheduled task to run net start <servicename> every few seconds. this will ensure that the service is brought up, and is a cheap no-op if the service is already running.

Note that it is not advised to run KurrentDB directly as a scheduled task because by default it will be run with low priority.

When addressing this issue consider the guidance here https://blog.stephencleary.com/2020/06/servicebase-gotcha-recovery-actions.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues which are a software defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions