Title: fix(mcp): retire pooled connections after consecutive request timeouts by waleedlatif1 · Pull Request #5821 · simstudioai/sim · GitHub
Open Graph Title: fix(mcp): retire pooled connections after consecutive request timeouts by waleedlatif1 · Pull Request #5821 · simstudioai/sim
X Title: fix(mcp): retire pooled connections after consecutive request timeouts by waleedlatif1 · Pull Request #5821 · simstudioai/sim
Description: Summary Follow-up to #5817, closing the P2 raised there ("Timed-Out Transport Remains Reusable"): a genuinely half-open transport could keep serving repeated 30s timeouts until the pool's liveness ping caught it. Adds a consecutive-timeout circuit breaker to the pool: a lone request timeout still keeps the session warm (retiring on every timeout is what caused the connect/stall/reconnect churn #5817 fixed), but two consecutive timeouts with no healthy request in between retire the connection. Any healthy release resets the count. withServerClient now reports sawTimeout on release; dead-connection errors still poison immediately, benign errors still keep the connection warm. Matches the LibreChat pattern (circuit breaker counts connection-level failures, not single request timeouts); the MCP SDK/OpenCode behavior for a lone timeout is unchanged. Type of Change Bug fix (resilience hardening) Testing 3 new pool tests: lone timeout keeps the connection; consecutive timeouts retire it (fresh connection on next acquire); healthy release resets the streak. Service test updated: timeout release reports (poison=false, sawTimeout=true). All 25 pool + service-pool tests green; tsc + biome clean. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary Follow-up to #5817, closing the P2 raised there ("Timed-Out Transport Remains Reusable"): a genuinely half-open transport could keep serving repeated 30s timeouts until the pool&...
X Description: Summary Follow-up to #5817, closing the P2 raised there ("Timed-Out Transport Remains Reusable"): a genuinely half-open transport could keep serving repeated 30s timeouts until t...
Opengraph URL: https://github.com/simstudioai/sim/pull/5821
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f4277a39-0cce-78f7-61eb-08e1c9ffd039 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D3F4:16ABB6:126EEDD:1A67F69:6A6341B8 |
| html-safe-nonce | 4cbf7089dd94b0111ba4f83a8ecafecc4906f95504cb7bda15543a7c1961826d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0Y0OjE2QUJCNjoxMjZFRUREOjFBNjdGNjk6NkE2MzQxQjgiLCJ2aXNpdG9yX2lkIjoiNjEzMTcwNDgzMDY0OTEyMzI1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8966ea96ded30b7497662c087eb8904336a347a2b78888c884559021d8375869 |
| hovercard-subject-tag | pull_request:4103591305 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5821/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Follow-up to #5817, closing the P2 raised there ("Timed-Out Transport Remains Reusable"): a genuinely half-open transport could keep serving repeated 30s timeouts until the pool&... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 59e55daad7174ca59d63c6974d58276ccb5477442e550bebb3c035e1bef11c94 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 990295d92a4cc7b63fbbd83a046217cd7d77d49c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width