Connection Lost - What to do?

Describe the problem/error/question

Connection Lost.

What is the error message (if any)?

You have a connection issue or the server is down.
n8n should reconnect automatically once the issue is resolved.

Please share your workflow

Not applicable

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: Version 1.98.0 and 1.99.1 before that
  • Database (default: SQLite): I think PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker on EC2
  • Operating system: Amazon Linux, I guess

That’s likely because of internet connection loss or server crashing. You can either wait for it to come back up, or if you are as impatient as I am, use the following steps:

  1. Open “Admin Panel” in a new page so that you don’t lose any unsaved progress/changes
  2. Click the gear button once you are in admin panel
  3. Scroll down and click “Restart workspace”. This will force restart the instance
  4. It should take up to 2 minutes for your instance to come back up. You can track the instance’s progress right under the “Open instance” button in the admin panel.

Hey @caiomvital hope all is well, welcome to the community.

I see you are running your n8n in docker. Have you checked your container? Is it running? What happens if you reload the page?

{
“nodes”: [
{
“parameters”: {
“promptType”: “define”,
“text”: “=Analyze the uploaded design image and generate a short, creative prompt that captures its visual theme and emotional tone. Focus on identifying key elements like symbolism, color psychology, and layout style. The prompt should be suitable for inspiring a motivational caption or branding concept for fitness or streetwear apparel.\n”,
“options”: {
“systemMessage”: “You are a creative prompt generation assistant specialized in T-shirt artwork refinement.\nYour job is to analyze an existing T-shirt design user message above and create a new, upgraded version that preserves the original layout, overall structure, and message placement, but enhances its visual style, mood, and artistic quality.\n\n✦ Keep all key design elements and text in their original positions — do not remove or move important words or graphics.\n✦ Improve the typography by suggesting more expressive font styling (e.g., handwritten, retro, bold serif, clean sans-serif, brush script), and enhance the lettering arrangement to feel more dynamic, elegant, or visually balanced.\n✦ Enhance illustrative elements, texture, and background details to feel more artistic, emotional, or premium — without overwhelming the message.\n✦ Use descriptive, natural language to generate a final prompt that can be used with Midjourney, DALL·E, or other image-generation AIs.\n✦ The new version should feel like a refined and artistic redesign, not a complete concept change.\n✦ Invisible background\n\nRule:\n- Output the final design prompt as a single plain-text sentence, without markdown, formatting, or line breaks. Make sure the prompt is concise but expressive, suitable for use inside a JSON payload or passed into an image generation API. All key elements must remain: characters, objects, text styling, and background mood — but the format should be clean, compact, and system-friendly.\n- Format the output as a single line of plain text, using escaped double quotes (\“) where needed, suitable for inclusion in a JSON string without formatting issues.\n- If the user chats about a front-facing design, check the memory to make appropriate adjustments.”
}
},
“id”: “dc90044d-f5a1-4f75-80c2-d8ae33fe66e3”,
“name”: “AI Agent”,
“type”: “@n8n/n8n-nodes-langchain.agent”,
“position”: [
1200,
352
],
“typeVersion”: 1.9
},
{
“parameters”: {
“model”: {
“__rl”: true,
“value”: “gpt-4.1-mini”,
“mode”: “list”,
“cachedResultName”: “gpt-4.1-mini”
},
“options”: {}
},
“id”: “b4a4329a-1687-470b-9531-03ee56ad8c9e”,
“name”: “OpenAI Chat Model”,
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“position”: [
1120,
592
],
“typeVersion”: 1.2,
“credentials”: {
“openAiApi”: {
“id”: “mNutWuTXSvkGxcgK”,
“name”: “OpenAi account”
}
}
},
{
“parameters”: {
“options”: {}
},
“id”: “fc9db6a3-3890-4f9b-928a-c8dd0f8141fa”,
“name”: “When chat message received”,
“type”: “@n8n/n8n-nodes-langchain.chatTrigger”,
“position”: [
480,
352
],
“webhookId”: “22b3dae3-95e5-4bfa-8187-9dca2dc72f85”,
“typeVersion”: 1.1
},
{
“parameters”: {
“conditions”: {
“options”: {
“version”: 2,
“leftValue”: “”,
“caseSensitive”: true,
“typeValidation”: “strict”
},
“combinator”: “and”,
“conditions”: [
{
“id”: “cb4e9a22-d429-4d11-b536-5d8760dd5042”,
“operator”: {
“type”: “string”,
“operation”: “startsWith”
},
“leftValue”: “={{ $json.chatInput }}”,
“rightValue”: “https://”
}
]
},
“options”: {}
},
“id”: “22756276-04ed-43bd-aa58-9e45a751f218”,
“name”: “If”,
“type”: “n8n-nodes-base.if”,
“position”: [
720,
352
],
“typeVersion”: 2.2
},
{
“parameters”: {
“jsCode”: “const rawContent = $json.output;\n\n// 1. Replace all line breaks with spaces\nlet cleaned = rawContent.replace(/\n/g, ’ ');\n\n// 2. Trim any extra spaces at the beginning and end\ncleaned = cleaned.trim();\n\n// 3. Escape backslashes and double quotes for JSON safety\nlet escaped = cleaned.replace(/\\/g, ‘\\\\’).replace(/”/g, ‘\\“’);\n\n// 4. Remove leading or trailing escaped quotes if accidentally included\nescaped = escaped.replace(/^\\\”/, ‘’).replace(/\\\"$/, ‘’);\n\n// 5. Return the cleaned and fully escaped string\nreturn [\n {\n json: {\n escapedString: escaped\n }\n }\n];\n”
},
“id”: “f39376fd-6310-4576-b07c-38c91f17de8c”,
“name”: “Code”,
“type”: “n8n-nodes-base.code”,
“position”: [
1488,
352
],
“typeVersion”: 2
},
{
“parameters”: {
“content”: “## Send a mockup image url to chat”,
“height”: 260,
“width”: 280
},
“id”: “b5d6638a-683a-41c9-a2a2-349b7390d2da”,
“name”: “Sticky Note”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
368,
240
],
“typeVersion”: 1
},
{
“parameters”: {
“content”: “## Analyze image and generate new prompt”,
“height”: 260,
“width”: 200,
“color”: 5
},
“id”: “3c81f3be-d7f8-4874-a48b-29b9b8da1496”,
“name”: “Sticky Note1”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
880,
240
],
“typeVersion”: 1
},
{
“parameters”: {
“content”: “## Generate the new Tshirt design by GPT Image 1”,
“height”: 260,
“width”: 440,
“color”: 3
},
“id”: “361d4c52-3edc-464d-af89-4013dd4b95f0”,
“name”: “Sticky Note2”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
1648,
240
],
“typeVersion”: 1
},
{
“parameters”: {
“resource”: “image”,
“model”: “gpt-image-1”,
“prompt”: “={{ $json.escapedString }}”,
“options”: {}
},
“id”: “8fa31818-fb07-4571-8ec6-c740041c3a82”,
“name”: “OpenAI1”,
“type”: “@n8n/n8n-nodes-langchain.openAi”,
“position”: [
1808,
352
],
“typeVersion”: 1.8,
“credentials”: {
“openAiApi”: {
“id”: “llIV1B7bDjEmmlmb”,
“name”: “OpenAi account 2”
}
}
},
{
“parameters”: {
“content”: “## Prompt Generation”,
“height”: 260,
“width”: 460
},
“id”: “2f5b907e-d979-4db1-954a-bb87af09dafd”,
“name”: “Sticky Note3”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
1136,
240
],
“typeVersion”: 1
},
{
“parameters”: {
“operation”: “toBinary”,
“sourceProperty”: “predictions[0].bytesBase64Encoded”,
“options”: {}
},
“id”: “32c939e3-e05b-4e5a-becb-a0fde7f9588f”,
“name”: “Convert to File”,
“type”: “n8n-nodes-base.convertToFile”,
“position”: [
1936,
640
],
“typeVersion”: 1.1,
“notes”: “Dùng cho ảnh nổi bật”
},
{
“parameters”: {
“method”: “POST”,
“url”: “https://generativelanguage.googleapis.com/v1beta/models/imagen-4.0-generate-preview-06-06:predict”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpQueryAuth”,
“sendBody”: true,
“specifyBody”: “json”,
“jsonBody”: “={\n “instances”: [\n {\n “prompt”: “{{ $json.escapedString }}”\n }\n ],\n “parameters”: {\n “sampleCount”: 1,\n “aspectRatio”: “3:4”\n }\n}”,
“options”: {}
},
“id”: “8d0d5db5-2762-4751-9580-5df640d12e4c”,
“name”: “Gemini Generate Image”,
“type”: “n8n-nodes-base.httpRequest”,
“position”: [
1712,
640
],
“typeVersion”: 4.2,
“credentials”: {
“httpQueryAuth”: {
“id”: “vaV0c81NBwEjdPEw”,
“name”: “Query Auth account”
}
},
“notes”: “Dùng cho ảnh nổi bật”
},
{
“parameters”: {
“resource”: “image”,
“operation”: “analyze”,
“modelId”: {
“__rl”: true,
“value”: “gpt-4o-mini”,
“mode”: “list”,
“cachedResultName”: “GPT-4O-MINI”
},
“text”: "=What’s in this image? ",
“imageUrls”: “={{ $json.chatInput }}”,
“options”: {}
},
“id”: “2e2f4744-5cd0-48ca-a547-26f6b48563c0”,
“name”: “Analyze image”,
“type”: “@n8n/n8n-nodes-langchain.openAi”,
“position”: [
912,
368
],
“typeVersion”: 1.8,
“credentials”: {
“openAiApi”: {
“id”: “mNutWuTXSvkGxcgK”,
“name”: “OpenAi account”
}
}
}
],
“connections”: {
“AI Agent”: {
“main”: [
[
{
“node”: “Code”,
“type”: “main”,
“index”: 0
}
]
]
},
“OpenAI Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“When chat message received”: {
“main”: [
[
{
“node”: “If”,
“type”: “main”,
“index”: 0
}
]
]
},
“If”: {
“main”: [
[
{
“node”: “Analyze image”,
“type”: “main”,
“index”: 0
}
],

]
},
“Code”: {
“main”: [
[
{
“node”: “Gemini Generate Image”,
“type”: “main”,
“index”: 0
}
]
]
},
“Gemini Generate Image”: {
“main”: [
[
{
“node”: “Convert to File”,
“type”: “main”,
“index”: 0
}
]
]
},
“Analyze image”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateId”: “3959”,
“templateCredsSetupCompleted”: true,
“instanceId”: “0cd8573a4d8a454bf3f5c3b3b534ed15c341bf4f91dd59a9d40255af927ea083”
}
}

Hey @Rithish
is there a question? Do you want to create a separate topic? Please use code tags for your workflow json when you do.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.