Skip to content

Sockets hanging in 3.929.0 on iot data plane client #7510

@jrbarnard

Description

@jrbarnard

Checkboxes for prior research

Describe the bug

When publishing to an mqtt topic via the iot data plane client in a batch it used to handle smaller maxSockets than the batch size absolutely fine. However since upgrading to 3.929.0 it hangs after using up the sockets for maxSockets and then doesn't release those sockets for the requests that are queued.

It works fine in 3.928.0.

Is this something to do with the big underlying refactor to use schema serde (PR, release notes)?

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/[email protected]

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

22.18.0

Reproduction Steps

const iotClient = new IoTClient(commonAwsConfig);

const describeEndpointCommand = new DescribeEndpointCommand({ endpointType: 'iot:Data-ATS' });
const iotEndpointResponse = await iotClient.send(describeEndpointCommand);

const iotDataPlaneClient = new IoTDataPlaneClient({
  endpoint: `https://${iotEndpointResponse.endpointAddress}`,
});

// Number in array more than maxSockets (defaults to 50)
const ids = new Array(100).fill(0).map((_, index) => String(index));

await Promise.all(ids.map(async (id) => {
    const publishCommand = new PublishCommand({
      topic: `a-test-topic/${id}`,
      qos: 1,
      payload: JSON.stringify({
        'hello': 'world',
      }),
    });

    console.debug(`Publishing ${id}`);
    await iotDataPlaneClient.send(publishCommand);
    console.debug(`Published ${id}`);
  }));

Observed Behavior

It just hangs and doesn't finishing publishing anything beyond what the default socket number is

Expected Behavior

To reuse the sockets and publish all successfully

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.closing-soonThis issue will automatically close in 4 days unless further comments are made.p1This is a high priority issuepotential-regressionMarking this issue as a potential regression to be checked by team member

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions