Skip to content

Fix timeouts#61

Open
fjgcosta wants to merge 1 commit intokaskol10:mainfrom
fjgcosta:timeout
Open

Fix timeouts#61
fjgcosta wants to merge 1 commit intokaskol10:mainfrom
fjgcosta:timeout

Conversation

@fjgcosta
Copy link

@fjgcosta fjgcosta commented Mar 13, 2026

Description

On large clusters (3k+ pods), evaluating workloads does not work. Code times out before completion.
Also nginx timeouts are hardcoded on configmap template.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test update

Related Issues

Closes #

Changes Made

Backend

  • Increase listWorkloads context timeout from 10s to 60s; add proper 504 response on deadline exceeded
  • Parallelize namespace iteration in ListAllWorkloads using bounded goroutines (max 10 concurrent) — reduces latency from O(N × latency) to O(max single namespace latency)
  • Replace N individual StatefulSet.Get() calls in calculateWorkloadsStorage with a single cluster-wide List() call

Helm chart

  • Make nginx proxy_connect_timeout, proxy_send_timeout, and proxy_read_timeout configurable via values.yaml; default proxy_read_timeout raised from 60s to 120s to align with the backend context timeout

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Test Results

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

Signed-off-by: Filipe Costa <fjg.costa@gmail.com>
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

Successfully merging this pull request may close these issues.

1 participant