Commit 7c4afe6
authored
fix: disable connection pooling to prevent stale connections after SnapStart (#671)
hyper-util's connection pool uses std::time::Instant (CLOCK_MONOTONIC)
to track idle connection age. After Lambda SnapStart restore (or
freeze/thaw cycles), CLOCK_MONOTONIC can be inconsistent, causing the
pool to reuse dead connections and resulting in IncompleteMessage errors.
This is a known upstream issue (hyperium/hyper#3810, rust-lang/rust#79462)
with no fix planned in hyper-util or Rust stdlib.
Disable connection pooling entirely via pool_max_idle_per_host(0). Since
the adapter communicates with localhost, the overhead of creating a new
TCP connection per request is negligible (microseconds).
Closes #6041 parent 028f205 commit 7c4afe6
1 file changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
524 | | - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
525 | 529 | | |
526 | 530 | | |
527 | 531 | | |
| |||
546 | 550 | | |
547 | 551 | | |
548 | 552 | | |
549 | | - | |
550 | | - | |
551 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
552 | 566 | | |
553 | 567 | | |
554 | 568 | | |
| |||
0 commit comments