Sending 500 requests parallely in awa appsync results error

0

I want to test how much request the aws appsync handle in my project. So I tested 500 parallel requests. And it throws following error: Error: Request failed with status code 429 at createError (/testcontainer/node_modules/axios/lib/core/createError.js:16:15) at settle (/testcontainer/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/testcontainer/node_modules/axios/lib/adapters/http.js:322:11) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)

  • These errors seem to come from your testing framework and not from the GraphQL API.

已提问 2 个月前141 查看次数
2 回答
0

Is this the request token error?

已回答 2 个月前
0

The error with status code 429 you encountered when sending 500 parallel requests to AWS AppSync is due to exceeding the API rate limits, which prevents excessive resource consumption. This is a common throttling response for managing data traffic and ensuring service stability.

AWS documentation doesn't provide a direct solution for the 429 error, but it outlines common issues that might help you diagnose and mitigate similar problems. Ensuring correct request mapping, resolver configurations, and return types can improve API performance and reduce unnecessary calls, which might indirectly help with throttling issues by reducing overall load

To handle this:

  1. Review AppSync's current rate limits for your account and consider requesting an increase if necessary.
  2. Implement exponential backoff and retry mechanisms in your code to better handle rate limiting.
  3. Optimize your application's data fetching strategies to reduce the number of necessary requests.
profile picture
专家
已回答 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则