Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
Welcome to the n8n community!
Would you like to share more information about your question?
here's the deal, right
I can send a message to my AI Agent just "chit-chat"
I even removed unneeded nodes in the workflow (I call it a Drivetrain)
everything works quicker
but when I asked a question, either it passes by the Vector DB node (It has clear instructions to use the Vector DB for memory recall) or when it does either the OpenAI Chat model or Google Gemini Chat Model errors out... 503
I've even done this with other retired un-modified workflows...
The exact same thing...
here's the kicker
those older workflows, NEVER--done that before
so, I don't know O.o?
The 503 error occurs because the prompt sent to OpenAI or Gemini becomes too large when the workflow uses Vector DB. This isn’t an n8n bug. In simple chit-chat it works because there’s no memory retrieval or context expansion.
The solution is to reduce what’s sent to the model. In the Vector DB node, limit Top K to two or three and avoid returning full documents, using only short chunks instead. Before the AI Agent, use a Set or Code node to send only the question and the minimal memory needed.
To validate, open the execution and check the Input of the OpenAI or Gemini node. If the text is lean and the error disappears, the problem was the context size.
Give it a try and let me know if that solves it!
Thank you for getting back with me, I greatly appreciate it. and I think I may have found the issue
I “Think”
HA! I made an n8n funny, >.> I’ll see myself out
So, I went into my Workflow and I carefully scanned through every nook and cranny before I did anything recommended… Maybe there was something in my AI Assistant’s Drivetrain that was becoming an issue…
Well, inside the Pinecone/OpenAI embeddings I seen this:
{{ 10000 }}
Since that never game me a problem before and the issue has been about “Memory/Token limits” I trimmed it to:
{{ 10 }}
asked my AI Assistant a question–Boom
The answer came out and no error codes
I wonder if that was perhaps the issue?
O.o?
My pleasure!
Probably yes, but who really understands these tech things anyway lol.
What matters is that it’s fixed.
if you need anything else, just let me know \o/
Have a good one!