Skip to content
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

add annotations for fixing 502 status code #527

Merged
merged 3 commits into from
Dec 14, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/system/dashboard/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
kubeapps:
ingress:
annotations:
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Timeout configuration needs alignment across services

The codebase shows inconsistent timeout configurations that could lead to reliability issues:

  • Default ingress-nginx has 10s timeout
  • Dashboard and Kubeapps both use 600s (10 min)
  • Bucket service uses 99999s (~27.7 hours)

Consider:

  1. Standardizing timeout values across services based on actual requirements
  2. Reducing the dashboard timeout from 600s to align closer with ingress-nginx defaults
  3. Particularly review the bucket service's excessive timeout of 99999s
🔗 Analysis chain

Consider a more conservative timeout value

While increasing the timeout can help prevent 502 errors, 600 seconds (10 minutes) is quite long and might mask underlying performance issues. Consider:

  1. Starting with a lower value (e.g., 120-180 seconds)
  2. Implementing proper monitoring to identify the root cause of long-running requests
  3. Gradually adjusting based on actual needs
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any existing timeout-related configurations in other ingress resources
rg -A 2 "proxy-read-timeout" --type yaml

Length of output: 1319

nginx.ingress.kubernetes.io/client-max-body-size: 100m
nginx.ingress.kubernetes.io/proxy-body-size: 100m
nginx.ingress.kubernetes.io/proxy-buffer-size: 16k
nginx.ingress.kubernetes.io/proxy-buffers-number: "4"
fullnameOverride: dashboard
postgresql:
enabled: false
Expand Down