HTTP Request constantly returns Response Code 429 "AxiosError"

Describe the problem/error/question

I use an HTTP Request Node to call the Replicate API to generate Images. The Node returns with an Error Message: “AxiosError: Request failed with status code 429”. BUT, it seems that the request is executed correctly on Replicate! I can view the created predictions on the webpage and look at the generated images. The node quits with an Error Message instead.

It has run many times already in the past few days. Just today, this error occurred.
What didn’t help so far:

  • introduce several waiting nodes
  • activate batch processing ‘1’ item in the HTTP node and long waiting times >5s.
  • run with only 1 prompt (similar to example) and execute by trigger

Instead, Postman executed everything without problem and API responded with the appropriate output-URLs. Replicate has a 600 requests/minute rate limit. I’m very very far away from that.

What went wrong recently, and how to solve it?

What is the error message (if any)?

[
  {
    "error": {
      "message": "Try spacing your requests out using the batching settings under 'Options'",
      "name": "AxiosError",
      "stack": "AxiosError: Request failed with status code 429\n    
          at settle (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/axios/lib/core/settle.js:19:12)\n    
          at RedirectableRequest.handleResponse (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/axios/lib/adapters/http.js:565:9)\n    
          at RedirectableRequest.emit (node:events:531:35)\n    
          at RedirectableRequest._processResponse (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/follow-redirects/index.js:409:10)\n    
          at ClientRequest.RedirectableRequest._onNativeResponse (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/follow-redirects/index.js:102:12)\n    at Object.onceWrapper (node:events:634:26)\n    
          at ClientRequest.emit (node:events:519:28)\n    
          at HTTPParser.parserOnIncomingClient (node:_http_client:772:27)\n    
          at HTTPParser.parserOnHeadersComplete (node:_http_common:122:17)\n    
          at TLSSocket.socketOnData (node:_http_client:614:22)\n    
          at Axios.request (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/axios/lib/core/Axios.js:45:41)\n    
          at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    
          at invokeAxios (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:272:10)\n    
          at proxyRequestToAxios (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:648:20)\n    
          at Object.request (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1789:4)",
      "code": "ERR_BAD_REQUEST",
      "status": 429
    }
  }
]

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.119.2
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n
  • Operating system:
1 Like

same issue in 1.121.3 even with 60s waiting node

After testing and investigating i think the reason for this error is:
Replicate switches your API request limit to 6 requests per Minute if your Balance drops < $5.

This is only displayed at the website when executing predictions manually.
The API Error is not helpful in that case.

After top-up, the predictions ran as expected again.

1 Like