Skip to content

Is there any way to Set KeepAliveTimeout and headersTimeout for bitgo/express Container Externally? #5747

Open

Description

@SatoshiRoppongi

When calling the BitGoExpress container API via an ALB, a 504 error may occur. After investigation, it seems likely that this is due to the issue described below, and I suspect that changing the keepAliveTimeout of Express can resolve it.

504 Gateway Timeout - Two EC2 Instances with Load Balancer

Note: The above reference is regarding EC2, but my environment is ECS. Therefore, it is necessary to be able to change this value externally when launching the Docker container.

Is there currently a way to externally change KeepAliveTimeout and headersTimeout when starting Docker?

Reference: https://nodejs.org/api/http.html#serverkeepalivetimeout

Activity

  1. changed the title [-]How to Set KeepAliveTimeout and headersTimeout for bitgo/express Container Externally[/-] [+]Is there any way to Set KeepAliveTimeout and headersTimeout for bitgo/express Container Externally?[/+] on Mar 12, 2025
  2. SatoshiRoppongi commented on Mar 13, 2025

    @SatoshiRoppongi
    ContributorAuthor

    I thought there was no such method, so I made modifications to add the keepAliveTimeout and headersTimeout options. I have created a pull request, so please review it.

  3. SatoshiRoppongi commented on Mar 13, 2025

    @SatoshiRoppongi
    ContributorAuthor

    Is there an automated process for docker push, such as in a CI/CD pipeline?
    If the source code changes are approved and merged into the master branch, and there is no automated docker push process, I would appreciate it if you could manually push the image to the registry.

  4. SatoshiRoppongi commented on Apr 11, 2025

    @SatoshiRoppongi
    ContributorAuthor

    I deployed bitgo/express latest with the environment variables BITGO_KEEP_ALIVE_TIMEOUT and BITGO_HEADERS_TIMEOUT set, but I couldn't resolve the 504 error.

    I understand that bitgo/express is a proxy server for the BitGo API, but I'm thinking that it might also be necessary to change the configuration values of the BitGo API itself.

  5. SatoshiRoppongi commented on Apr 24, 2025

    @SatoshiRoppongi
    ContributorAuthor

    After reducing the number of BitGoExpress's Fargate instances from two to one, the occurrence rate of 520 errors has increased.

    There might be some issue occurring with BitGo's Cloudflare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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