Timeouts
Timeouts define how long LoadStrike waits for shutdown, coordination, and correlation before work is treated as too slow or incomplete.
Matching docs
Search across docs titles, summaries, groups, and section headings.
Use Up and Down Arrow to move through results, then press Enter to open the active page.
No indexed docs matched that search. Try a broader term or open the docs hub.
What this page helps you do
What this page helps you do
Timeouts define how long LoadStrike waits for shutdown, coordination, and correlation before work is treated as too slow or incomplete.
Who this is for
Engineers writing or reviewing scenario code in one of the supported SDKs.
Prerequisites
- A scenario or runtime surface you want to wire correctly in code
By the end
The exact SDK surface you need for this part of the runtime.
Use this page when
Use this reference when you already know the workflow and need the exact Timeouts API surface in code.
Visual guide
Guide
What Timeouts Control
Timeouts define the wait boundaries around shutdown, cluster coordination, and cross-system matching. Change them when the system is slower than the defaults or when you want failures to show up sooner.
Runner Timeouts
WithScenarioCompletionTimeout controls how long LoadStrike waits for scenarios to shut down cleanly. WithClusterCommandTimeout controls how long the coordinator waits for agent results and cluster acknowledgements in distributed runs.
Correlation Timeout
CrossPlatformTrackingConfiguration.CorrelationTimeout controls how long LoadStrike waits for a destination match after the source event has been seen. TimeoutCountsAsFailure decides whether a missed match should also increase failure totals.
Validation Rules
When you set timeout and poll values directly, they must be positive. Keep the values long enough for the real workflow, but short enough that timeouts still help surface broken paths quickly.
SDK reference samples
Use these SDK samples to compare how Timeouts is exposed across the supported languages before you wire it into a full scenario.
If you run these examples locally, add a valid runner key before execution starts. Set it with WithRunnerKey("...") or the config key LoadStrike:RunnerKey.
Timeouts
using LoadStrike;
var scenario = LoadStrikeScenario.Empty("timeout-demo")
.WithLoadSimulations(LoadStrikeSimulation.KeepConstant(1, TimeSpan.FromSeconds(20)));
var context = LoadStrikeRunner.RegisterScenarios(scenario)
.WithScenarioCompletionTimeout(TimeSpan.FromSeconds(45))
.WithClusterCommandTimeout(TimeSpan.FromSeconds(90))
.WithRunnerKey("rkl_your_local_runner_key");
context.Run();
package main
import (
"time"
loadstrike "loadstrike.com/sdk/go"
)
func main() {
tracking := &loadstrike.TrackingConfigurationSpec{
CorrelationTimeoutSeconds: 10,
TimeoutSweepIntervalSeconds: 0.5,
TimeoutBatchSize: 50,
TimeoutCountsAsFailure: true,
}
loadstrike.RegisterScenarios(
loadstrike.CreateScenario("timeout-demo", func(loadstrike.LoadStrikeScenarioContext) loadstrike.LoadStrikeReply {
return loadstrike.OK()
}).WithTrackingConfiguration(tracking),
).WithScenarioCompletionTimeout(loadstrike.TimeSpan(30 * time.Second)).Run()
}
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeRunner;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeScenario;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeSimulation;
var scenario = LoadStrikeScenario
.empty("timeout-demo")
.withLoadSimulations(LoadStrikeSimulation.keepConstant(1, 20d));
LoadStrikeRunner
.registerScenarios(scenario)
.withScenarioCompletionTimeout(45d)
.withClusterCommandTimeout(90d)
.withRunnerKey("rkl_your_local_runner_key")
.run();
from loadstrike_sdk import LoadStrikeRunner, LoadStrikeScenario, LoadStrikeSimulation
scenario = (
LoadStrikeScenario.empty("timeout-demo")
.with_load_simulations(LoadStrikeSimulation.keep_constant(1, 20))
)
LoadStrikeRunner.register_scenarios(scenario) \
.with_scenario_completion_timeout(45) \
.with_cluster_command_timeout(90) \
.with_runner_key("rkl_your_local_runner_key") \
.run()
import { LoadStrikeRunner, LoadStrikeScenario, LoadStrikeSimulation } from "@loadstrike/loadstrike-sdk";
const scenario = LoadStrikeScenario
.empty("timeout-demo")
.withLoadSimulations(LoadStrikeSimulation.keepConstant(1, 20));
await LoadStrikeRunner
.registerScenarios(scenario)
.withScenarioCompletionTimeout(45)
.withClusterCommandTimeout(90)
.withRunnerKey("rkl_your_local_runner_key")
.run();
const { LoadStrikeRunner, LoadStrikeScenario, LoadStrikeSimulation } = require("@loadstrike/loadstrike-sdk");
(async () => {
const scenario = LoadStrikeScenario
.empty("timeout-demo")
.withLoadSimulations(LoadStrikeSimulation.keepConstant(1, 20));
await LoadStrikeRunner
.registerScenarios(scenario)
.withScenarioCompletionTimeout(45)
.withClusterCommandTimeout(90)
.withRunnerKey("rkl_your_local_runner_key")
.run();
})();
Timeout-related fields and methods
Cross-platform tracking timeout for waiting on a destination match. It must stay greater than zero.
How often pending correlation entries are checked for timeout expiry. It must stay greater than zero.
How many expired correlation entries are processed in one sweep. It must stay greater than zero.
Per-request timeout for HttpEndpointDefinition. Use it when the HTTP adapter needs a different timeout than the default 30 seconds.
Runner-level graceful-stop timeout for scenarios that need extra time to finish current work before shutdown completes.
Runner-level timeout for coordinator-agent command and result coordination.
Runner-level timeout for license validation before the run begins.