Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ OPR_EXECUTOR_DOCKER_HUB_PASSWORD=
OPR_EXECUTOR_RUNTIME_VERSIONS=v2,v5
OPR_EXECUTOR_RETRY_ATTEMPTS=5
OPR_EXECUTOR_RETRY_DELAY_MS=500
OPR_EXECUTOR_CONNECT_TIMEOUT=
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ services:
- OPR_EXECUTOR_RETRY_ATTEMPTS
- OPR_EXECUTOR_RETRY_DELAY_MS
- OPR_EXECUTOR_IMAGE_PULL
- OPR_EXECUTOR_CONNECT_TIMEOUT

volumes:
openruntimes-builds:
Expand Down
6 changes: 3 additions & 3 deletions src/Executor/Runner/Docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ public function createExecution(
\curl_setopt($ch, CURLOPT_POST, true);
\curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
\curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
\curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
\curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, (int)Http::getEnv('OPR_EXECUTOR_CONNECT_TIMEOUT', '10'));

\curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
Expand Down Expand Up @@ -905,7 +905,7 @@ public function createExecution(
\curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
\curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
\curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
\curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
\curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, (int)Http::getEnv('OPR_EXECUTOR_CONNECT_TIMEOUT', '10'));

\curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
Expand Down Expand Up @@ -995,7 +995,7 @@ public function createExecution(
});

\curl_setopt($ch, CURLOPT_TIMEOUT, $timeout + 5); // Gives extra 5s after safe timeout to recieve response
\curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
\curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, (int)Http::getEnv('OPR_EXECUTOR_CONNECT_TIMEOUT', '5'));
if ($logging === true) {
$headers['x-open-runtimes-logging'] = 'enabled';
} else {
Expand Down