Skip to content

Socket timed out without establishing a connection within 3100 ms #1551

Open
@ala85

Description

@ala85

A NodeJs application, running on my machine, localhost, has the following

const { HttpsProxyAgent } = require('https-proxy-agent');
const { NodeHttpHandler } = require('@smithy/node-http-handler');

...
const proxyAgent = new HttpsProxyAgent(process.env.PROXY);
    const requestHandler = new NodeHttpHandler({
      connectionTimeout: 30001,
      requestTimeout: 60001,
      socketAcquisitionWarningTimeout: 60001,
      httpAgent: proxyAgent,
      httpsAgent: proxyAgent,
    });

..
const credentials = fromTemporaryCredentials({
      params: assumeRoleParams,
      credentials: Credentials,
      region: process.env.AWS_DEFAULT_REGION,
    });


return new SQSClient(
      {
        region: process.env.AWS_DEFAULT_REGION,
        credentials,
        requestHandler,
      },
    );

..
const command = new ReceiveMessageCommand({
    QueueUrl: queueUrl,
    MaxNumberOfMessages: 10,
    WaitTimeSeconds: 20, // Long polling
    AttributeNames: ['All'],
    MessageAttributeNames: ['All'],
  });

const { Messages } = await client.send(command);

Regardless of any combinations of parameters, the socket timeout still seems to be defaulting to 3100ms:

Socket timed out without establishing a connection within 3100 ms

Am I missing something? SocketTimeout is derecated in favour of requestTimeout, but issue persists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions