Skip to content

Commit b8ef8cb

Browse files
authored
Merge pull request #6474 from keboola/devin/1767605441-curl-timeout-fixes
feat: add curl options to prevent stuck connections
2 parents 9d28473 + 8e1e8b2 commit b8ef8cb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Keboola/StorageApi/Client.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ private function initClient(array $config)
213213
'base_uri' => $this->apiUrl,
214214
'handler' => $handlerStack,
215215
'connect_timeout' => RequestTimeoutMiddleware::REQUEST_TIMEOUT_DEFAULT,
216+
'curl' => [
217+
CURLOPT_LOW_SPEED_LIMIT => 1,
218+
CURLOPT_LOW_SPEED_TIME => 120,
219+
CURLOPT_TCP_KEEPALIVE => 1,
220+
CURLOPT_TCP_KEEPIDLE => 60,
221+
CURLOPT_TCP_KEEPINTVL => 30,
222+
],
216223
]);
217224
}
218225

0 commit comments

Comments
 (0)