You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parakeet /v2/transcribe is returning ~15% 504 errors on the internal load balancer. Root cause identified:
LB timeout (30s) vs client timeout (120s) mismatch.
The parakeet-backend-config BackendConfig is missing timeoutSec, so GCP defaults to 30s. The HTTP client in backend/utils/stt/pre_recorded.py sets read=120s. Any audio chunk requiring >30s GPU processing consistently 504s on both attempts (retry is useless — same LB timeout).
Compare: prod-pusher-backend-config and prod-agent-proxy-backend-config both set timeoutSec: 3600.
Affected Callers
Caller
Service
Failure behavior
sync.py:574 process_segment()
backend-sync
Cloud Tasks retries whole job
postprocess_conversation.py:82
backend
Falls back to streaming transcript
chat.py:135 transcribe_voice_message_segment()
backend
Silent failure — user gets no transcription
Required Changes
1. BackendConfig timeout fix
Add timeoutSec: 120 to parakeet-backend-config spec to match client expectation.
2. HPA max replicas → 2
Current HPA maxReplicas: 1 (clamped) means parakeet cannot scale under load. Increase to maxReplicas: 2 with appropriate scale-up/scale-down policy:
Scale-up: allow adding 1 pod when GPU utilization or request backlog exceeds threshold
Scale-down: stabilization window of 10-15 minutes to avoid flapping on bursty traffic
3. Scale policy recommendations
Scale-up trigger: sustained high request latency or queue depth
Scale-down stabilization: 600s (prevent premature scale-down during burst gaps)
Behavior: conservative scale-down (1 pod at a time), faster scale-up
Activity
fix(parakeet): add connection draining to protect in-flight requests
fix(parakeet): support configurable terminationGracePeriodSeconds
fix(parakeet): set terminationGracePeriodSeconds: 150 in prod values
fix(parakeet): LB timeout + HPA scaling for GPU service (#8737)
fix(parakeet): add 120s LB timeout to BackendConfig to fix 504s
fix(parakeet): set HPA maxReplicas=2 with GPU-safe scaling policy