Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
This repository was archived by the owner on May 30, 2024. It is now read-only.

Client error-ing out on long-running AWS Lambdas (getaddrinfo EMFILE stream.launchdarkly.com) #272

@alice-was-here

Description

@alice-was-here

Describe the bug

On long running lambda instances, the Launch Darkly client appears to get stuck in a loop while trying to establish a connection. This loop continues until the lambda function times out, or runs out of memory.

To reproduce

This error only occurs intermittently, but is most common in the following circumstances:

  • Have a long running AWS Lambda instance (greater than 45 minutes).
  • Try to initialise the Launch Darkly client within a function on the lambda
  • When initialising, the client gets stuck in a loop and outputs the following error until the function times out or runs out of memory. ERROR warn: [LaunchDarkly] Received I/O error (getaddrinfo EMFILE stream.launchdarkly.com) for streaming request - will retry
  • Subsequent calls to the function on the same lambda instance will successfully establish a Launch Darkly connection

Expected behavior

Ideally:

  • The client is successfully able to establish a connection

However, an acceptable fall-back would be:

  • If the client cannot establish a connection, a sensible error is thrown - rather than the function timing out.

Logs

The following log is repeated in the output until the Lambda function times out.

ERROR warn: [LaunchDarkly] Received I/O error (getaddrinfo EMFILE stream.launchdarkly.com) for streaming request - will retry

SDK version
launchdarkly-node-server-sdk v7.0.0

Language version, developer tools

AWS Lambda running nodejs:18.v4

OS/platform

AWS Lambda running nodejs:18.v4

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