fix(update): add timeout to prevent pull command from hanging
- Add --max-time 600 (10 min) to curl pull command - Add timeout: 660 to n8n executeCommand node Docker's /images/create API streams progress until complete. Without timeout, large image pulls could hang indefinitely. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+4
-2
@@ -1564,7 +1564,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"jsCode": "// Build pull image command\nconst imageName = $json.imageName;\n\nreturn {\n json: {\n cmd: `curl -s --unix-socket /var/run/docker.sock -X POST 'http://localhost/v1.47/images/create?fromImage=${encodeURIComponent(imageName)}'`,\n imageName,\n currentImageId: $json.currentImageId,\n currentVersion: $json.currentVersion,\n containerConfig: $json.containerConfig,\n hostConfig: $json.hostConfig,\n networkSettings: $json.networkSettings,\n containerName: $json.containerName,\n containerId: $json.containerId,\n chatId: $json.chatId\n }\n};"
|
"jsCode": "// Build pull image command\nconst imageName = $json.imageName;\n\nreturn {\n json: {\n cmd: `curl -s --max-time 600 --unix-socket /var/run/docker.sock -X POST 'http://localhost/v1.47/images/create?fromImage=${encodeURIComponent(imageName)}'`,\n imageName,\n currentImageId: $json.currentImageId,\n currentVersion: $json.currentVersion,\n containerConfig: $json.containerConfig,\n hostConfig: $json.hostConfig,\n networkSettings: $json.networkSettings,\n containerName: $json.containerName,\n containerId: $json.containerId,\n chatId: $json.chatId\n }\n};"
|
||||||
},
|
},
|
||||||
"id": "code-build-pull-cmd",
|
"id": "code-build-pull-cmd",
|
||||||
"name": "Build Pull Command",
|
"name": "Build Pull Command",
|
||||||
@@ -1578,7 +1578,9 @@
|
|||||||
{
|
{
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"command": "={{ $json.cmd }}",
|
"command": "={{ $json.cmd }}",
|
||||||
"options": {}
|
"options": {
|
||||||
|
"timeout": 660
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"id": "exec-pull-image",
|
"id": "exec-pull-image",
|
||||||
"name": "Pull Image",
|
"name": "Pull Image",
|
||||||
|
|||||||
Reference in New Issue
Block a user