{"record":{"id":"ad9b596c3732fb65","repo":"n8n-io/n8n","slug":"admittance-rejected-ad9b59","errorCode":"admittance_rejected","errorMessage":"admittance_rejected","messagePattern":"admittance_rejected","errorType":"http","errorClass":null,"httpStatus":429,"severity":"warning","filePath":"packages/@n8n/engine/src/server/routes/workflow-executions.ts","lineNumber":71,"sourceCode":"export function createWorkflowExecutionsRouter(startExecution: StartExecutionService): RouterType {\n\tconst router = Router();\n\n\trouter.post('/', async (req, res) => {\n\t\tconst parsed = StartExecutionBody.safeParse(req.body);\n\t\tif (!parsed.success) {\n\t\t\tres.status(400).json({\n\t\t\t\terror: 'invalid_request',\n\t\t\t\tdetails: parsed.error.flatten(),\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst result = await startExecution.start(parsed.data);\n\t\t\tres.status(201).json(result);\n\t\t} catch (error) {\n\t\t\tif (error instanceof AdmittanceRejectedError) {\n\t\t\t\tres.status(429).json({ error: 'admittance_rejected', reason: error.reason });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (error instanceof GraphValidationError) {\n\t\t\t\tres.status(400).json({ error: 'invalid_graph', reason: error.message });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (error instanceof UnimplementedError) {\n\t\t\t\tres.status(501).json({ error: 'unimplemented', reason: error.message });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t});\n\n\treturn router;\n}\n","sourceCodeStart":53,"sourceCodeEnd":88,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/engine/src/server/routes/workflow-executions.ts#L53-L88","documentation":"Returned as HTTP 429 {error:'admittance_rejected', reason:...} when startExecution.start() throws AdmittanceRejectedError. The admittance gate (packages/@n8n/engine/src/admittance) rejects new executions under backpressure or capacity limits; the reason string explains why. This is a transient, server-side throttle — the request itself was well-formed and the graph valid.","triggerScenarios":"POST /workflow-executions while the engine is at its configured concurrent-execution or queue-depth limit. The admittance service rejects the execution before any step runs; reason typically names the limiting resource (e.g. max in-flight executions reached).","commonSituations":"Burst of workflow triggers exceeding capacity. A downstream dependency slowing the queue so executions pile up. Capacity misconfigured too low for the workload. Running load tests against a small engine instance.","solutions":["Retry the request after a short backoff (honor 429 semantics); the reason field often indicates when to retry.","Reduce trigger fan-out or batch the submissions to stay under the concurrent-execution cap.","Raise the engine's admittance/capacity limits if the workload legitimately exceeds them.","Inspect the reason field to identify which resource is saturated (in-flight executions, queue depth)."],"exampleFix":"// before — fire and forget on a 429\nconst res = await fetch('/workflow-executions', { method: 'POST', body: JSON.stringify(payload) });\n// after — retry with exponential backoff on admittance_rejected\nasync function startWithRetry(payload, attempts = 5) {\n  for (let i = 0; i < attempts; i++) {\n    const res = await fetch('/workflow-executions', { method: 'POST', body: JSON.stringify(payload) });\n    if (res.status === 429) { await sleep(2 ** i * 200); continue; }\n    return res;\n  }\n  throw new Error('admittance rejected after retries');\n}","handlingStrategy":"retry","validationCode":"// No client-side validation prevents a server-side throttle; instead probe capacity if an endpoint exists.\n// Otherwise, throttle locally to a rate you know the engine accepts.","typeGuard":null,"tryCatchPattern":"async function startWithBackoff(payload, maxAttempts = 5) {\n  for (let i = 0; i < maxAttempts; i++) {\n    const res = await fetch('/workflow-executions', { method: 'POST', body: JSON.stringify(payload) });\n    if (res.status !== 429) return res;\n    const body = await res.json(); // body.reason explains the limit\n    await new Promise(r => setTimeout(r, 2 ** i * 200));\n  }\n  throw new Error('admittance_rejected after retries');\n}","preventionTips":["Treat 429 admittance_rejected as retryable with exponential backoff.","Read the reason field to learn which resource is saturated (in-flight executions, queue depth).","Cap your trigger fan-out to stay under the engine's concurrent-execution limit.","Raise the engine's admittance limits if the workload legitimately needs more capacity."],"tags":["engine","http","backpressure","retry","rate-limit"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}