Files
Mads Jon Nielsen c099d665a2 feat(caddy): configurable max_idle_time for autoscaled threads (#2225)
Add configurable max_idle_time for autoscaled threads

The idle timeout for autoscaled threads is currently hardcoded to 5
seconds. With bursty traffic patterns, this causes threads to be
deactivated too quickly, leading to repeated cold-start overhead when
the next burst arrives.

This PR replaces the hardcoded constant with a configurable
max_idle_time directive, allowing users to tune how long idle
autoscaled threads stay alive before deactivation. The default remains 5
seconds, preserving existing behavior.

  Usage:

  Caddyfile:
````
  frankenphp {
      max_idle_time 30s
  }
````
  JSON config:
```
  {
      "frankenphp": {
          "max_idle_time": "30s"
      }
  }
````

  Changes:
  - New max_idle_time Caddyfile directive and JSON config option
  - New WithMaxIdleTime functional option
- Replaced hardcoded maxThreadIdleTime constant with configurable
maxIdleTime variable
  - Added tests for custom and default idle time behavior
  - Updated docs
2026-03-06 14:43:37 +01:00
..
2026-02-03 14:52:16 +01:00
2026-03-03 11:41:21 +01:00
2026-02-03 14:52:16 +01:00
2026-02-03 14:52:16 +01:00
2026-02-03 14:52:16 +01:00
2026-02-03 14:52:16 +01:00
2026-02-03 14:52:16 +01:00
2025-04-23 01:02:44 +02:00
2026-02-08 21:09:13 +01:00