- Newest
- Most votes
- Most comments
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.
Relevant content
- asked 2 months ago
- asked 9 months ago
- asked 5 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 months ago