Skip to content

Make executor timeout configurable via server config #6282

@sachin9058

Description

@sachin9058

Please describe the enhancement

Currently, the executor event handling timeout is hardcoded using DefaultExecutionTimeout.

This makes it difficult to adjust execution behavior across different environments (e.g., local development vs CI vs production). Any change requires modifying code instead of using configuration.

This could be improved by making the execution timeout configurable, allowing users to tune behavior without code changes. This would provide flexibility and better control over execution timing.

Solution Proposal

Introduce a configurable execution timeout in the server configuration:

  • Add a new execution_timeout field to server config
  • Pass this value through the service layer into the executor event handler
  • Validate the value and fallback to DefaultExecutionTimeout if invalid (zero or negative)
  • Log the effective timeout during initialization for visibility

This ensures that timeout behavior is configurable while maintaining safe defaults.

Describe alternatives you've considered

  • Keeping the timeout hardcoded (current approach), but this limits flexibility
  • Using environment variables directly instead of config, but this would be inconsistent with the existing configuration system

The proposed config-based approach aligns better with the current design of the project.

Additional context

This change builds on recent improvements where the execution timeout was introduced at the handler level but is not yet fully exposed via configuration.

Making it configurable would complete that feature and improve usability.

Acceptance Criteria

  • A new execution_timeout field exists in server configuration
  • The timeout value is passed from config → service → executor handler
  • Invalid values (<= 0) fallback to DefaultExecutionTimeout
  • Effective timeout is logged during initialization
  • Unit tests cover:
    • custom timeout usage
    • fallback to default timeout
  • All existing tests pass
  • Lint checks pass with no issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions