Skip to content

504 Gateway Timeout in corporate environment - GitHub API calls hang #263

@muminkoykiran

Description

@muminkoykiran

Environment

  • Deployment: OpenShift/Kubernetes
  • Network: Corporate environment with proxy
  • GitHub Enterprise: Enterprise-level Copilot metrics
  • Container: Alpine Linux with Node.js

Problem Description

Application fails with 504 Gateway Timeout when accessing the main page. Logs show GitHub API calls start but
never complete.

Logs

Listening on http://[::]:3000
Request: GET https://copilot-metrics-viewer-example.apps.company.com/
Request: GET https://copilot-metrics-viewer-example.apps.company.com/api/seats?githubEnt=myenterprise&githubTeam=MyTeam&scope=enterprise
Fetching 1st page of seats data from https://api.github.com/enterprises/myenterprise/copilot/billing/seats

[No further logs after this point - application hangs]
[Browser shows: 504 Gateway Time-out - The server didn't respond in time]

Network Investigation from Pod

  • DNS resolution works: api.github.com → 140.82.121.5
  • Basic connectivity tests hang (wget, nc commands don't return)
  • Corporate proxy environment with HTTP_PROXY/HTTPS_PROXY configured
  • NO_PROXY should include GitHub APIs

Questions

  1. Are there any timeout configurations for GitHub API calls?
  2. How can we add better error handling/logging for failed API requests?
  3. Any recommendations for debugging network connectivity issues?
  4. Should the application gracefully handle API failures instead of hanging?

Configuration

  • NUXT_PUBLIC_SCOPE=enterprise
  • NUXT_GITHUB_TOKEN=<valid_token>
  • Proxy settings configured but GitHub APIs should bypass proxy

Expected Behavior

GitHub API calls should complete successfully or fail gracefully with proper error handling.

Actual Behavior

API calls hang indefinitely, causing 504 Gateway Timeout for the entire application.

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