Commit 6000f87
authored
feat(transport): Add a timeout (#4252)
For some reason, we don't define any timeouts in our default
transport(s).
With this change:
- We add a 30s total timeout for the whole connect+read cycle in the
default HTTP transport
- In the experimental HTTP/2 httpcore-based transport there is no way to
set a single timeout, so we set 15s each for getting a connection from
the pool, connecting, writing, and reading
Backend SDKs in general set wildly different timeouts, from 30s in Go to
<5s in Ruby or PHP. I went for the higher end of the range here since
this is mainly meant to prevent the SDK preventing process shutdown like
described in #4247 --
we don't want to cut off legitimate requests that are just taking a long
time. (I was considering going even higher, maybe to 60s -- but I think
30s is a good first shot at this and we can always change it later.)1 parent fb6d374 commit 6000f87
2 files changed
+49
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| |||
621 | 623 | | |
622 | 624 | | |
623 | 625 | | |
| 626 | + | |
624 | 627 | | |
625 | 628 | | |
626 | 629 | | |
| |||
736 | 739 | | |
737 | 740 | | |
738 | 741 | | |
| 742 | + | |
| 743 | + | |
739 | 744 | | |
740 | 745 | | |
741 | 746 | | |
| |||
765 | 770 | | |
766 | 771 | | |
767 | 772 | | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
768 | 781 | | |
769 | 782 | | |
770 | 783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
274 | 279 | | |
275 | 280 | | |
276 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
277 | 313 | | |
278 | 314 | | |
279 | 315 | | |
| |||
0 commit comments