You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to post to a WebsocketMessage to my connections neither the postToConnection functions rejects an error nor it does resolves within the given requestTimeout. In the end I run into lambda timeout.
In some cases I have got lambda timeout for my lambda function which distributes messages to websocket connection. While debugging I added logging and found that in the cases the lambda times out the "Start sending connection.id" log is written but "Finished sending connection.id" log gets not written and for the same connection.id also the error log is not written. Therefore I assume the postToConnection function does not resolve or rejects even after the requestTimeout of 5sec is reached. The Lambda functions Timeout is set to 30sec.
Checkboxes for prior research
Describe the bug
When I try to post to a WebsocketMessage to my connections neither the postToConnection functions rejects an error nor it does resolves within the given requestTimeout. In the end I run into lambda timeout.
In some cases I have got lambda timeout for my lambda function which distributes messages to websocket connection. While debugging I added logging and found that in the cases the lambda times out the "Start sending connection.id" log is written but "Finished sending connection.id" log gets not written and for the same connection.id also the error log is not written. Therefore I assume the postToConnection function does not resolve or rejects even after the requestTimeout of 5sec is reached. The Lambda functions Timeout is set to 30sec.
`async sendMessage(connection: WebsocketConnection, message: WebsocketMessage) {
const data = new TextEncoder().encode(JSON.stringify(message));
const postParams: PostToConnectionCommandInput = {
ConnectionId: connection.id,
Data: data,
};
Regression Issue
SDK version number
@aws-sdk/client-apigatewaymanagementapi@3.749.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
Node.js 20.x
Reproduction Steps
I do not not know why it appears, that the postToConnection function does not resolves or rejects.
Observed Behavior
Sometimes but not every time the postToConnection function does not resolve or reject.
Expected Behavior
I would expect postToConnection to reslove or reject at least after the requestTimeout is reached.
Possible Solution
No response
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: