Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ala85 opened this issue Mar 24, 2025 · 0 comments
Open

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

ala85 opened this issue Mar 24, 2025 · 0 comments

Comments

@ala85
Copy link

ala85 commented Mar 24, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant