Commit 48ea89a
feat: add curl options to prevent stuck connections
Add three curl options to the Guzzle client to prevent connections from
getting stuck indefinitely:
1. Low-speed stall guard (CURLOPT_LOW_SPEED_LIMIT + CURLOPT_LOW_SPEED_TIME):
Fails requests if transfer speed drops below 1 byte/sec for 120 seconds
2. Disable connection reuse (CURLOPT_FORBID_REUSE + CURLOPT_FRESH_CONNECT):
Prevents reusing stale keep-alive connections that may be half-closed
3. TCP keepalive (CURLOPT_TCP_KEEPALIVE + CURLOPT_TCP_KEEPIDLE + CURLOPT_TCP_KEEPINTVL):
Enables TCP-level keepalive to detect dead connections
Co-Authored-By: ondrej.hlavacek@keboola.com <ondrej.hlavacek@keboola.com>1 parent 9d28473 commit 48ea89a
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
216 | 225 | | |
217 | 226 | | |
218 | 227 | | |
| |||
0 commit comments