- 最新
- 最多得票
- 最多評論
LimitExceededException - The client is sending more than the allowed number of requests per unit of time or the WebSocket client side buffer is full.
In your case the client refers to the Lambda that is calling postToConnection API.... there is a limit at which this API can be invoked per second... once we go beyond the limit thats when it results in the LimitExceededException. https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/apigatewaymanagementapi/AmazonApiGatewayManagementApi.html#postToConnection-com.amazonaws.services.apigatewaymanagementapi.model.PostToConnectionRequest-
Note: Request rate limit of postToConnection is unknown as we couldn't find related documentation.
Possible Solution: Check the response from postToConnection if it results in LimitExceededException then retry by waiting for few hundred milliseconds. Best practice is to apply exponential backoff with jitter https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
"The websocket client side" means the client who subscribe the Websocket. For example , A--->B--->C , When A calls postToConnection of B, B will send data to C, but the recieve buffer of C if full, so there will be exception of B maybe named timeout. So B returns LimitExceededException to A.
相關內容
- 已提問 6 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前