Hedgehog Documentation

Dispatching & Running Executions

  • Last Modified: 2019-07-18

The service uses the ExecutionDispatcher Task Runner to query the database for executions with a Run State of "Pending" to a Start Date that is before or equal to the current DateTime. For each suitable execution found, a new background task is used to run the execution.

The Service administration page will display the currently running background tasks that were created by the ExecutionDispatcher, and provide links to the appropriate Execution in Progress page.

When the execution is complete, the background task will terminate; you can view all executions (regardless of state) using the Executions administration page, although it will probably be easier to find the specific execution record using a more specific context (such as package deployment history).

Troubleshooting: "Stuck" or "Frozen" Executions

An execution's lifecycle is generally short, but can range from just a few seconds to several hours. Executions cannot be canceled per se, but some executions (namely, deployment executions) support cancellation requests.

Like all computer programs, it's certainly possible for an execution to "freeze up" (i.e. remain indefinitely in an Executing state while not logging any new information).

Because execution lifecycles vary so much, there's no definitive rule for determining when an execution is "frozen", and thus there is no way to programmatically detect it. You'll simply have to use your judgment.

When an execution becomes "stuck", it's most certainly one of several error conditions:

  • Invalid state with the EventDispatcher
  • Execution engine halted without reporting
  • Code that the execution engine is running
  • Third-party code never returning or timing out properly

The only safe way to clear a "stuck" execution is to stop and then start the service. This will obviously also halt all other running executions, so be careful when doing that.

When the service starts up again, all executions in a "Executing" state will be changed to "Completed", and marked as "Failed".

If the same type of execution continues to get stuck in the same place, try to gather as much information as you can to help us isolate the problem and submit a ticket with the details you've gathered.

Is this documentation incorrect or incomplete? Help us by contributing!

This documentation is licensed under CC-BY-SA-4.0 and stored in GitHub.

Generated from commit ce197caa on master