503 service unavailable happen randomly. Not sure why?
Is anyone else experiencing similar 503 errors with Gemini API recently?
503 service unavailable happen randomly. Not sure why?
Is anyone else experiencing similar 503 errors with Gemini API recently?
Yes, we’re seeing the same thing — frequent 503s and occasional 502s on gemini-2.5-flash at production volume, not just occasional spikes.
Observed logs:
Error 1: 503 Service Unavailable (High Demand)
Model: gemini-2.5-flash
Endpoint: generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent
HTTP Status: 503
Latency: 1463ms
Message: [GoogleGenerativeAI Error]: Error fetching from endpoint: [503 Service Unavailable] This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.
Error 2: 502 Bad Gateway
Model: gemini-2.5-flash
Same endpoint as above.
HTTP Status: 502
Latency: 5605ms
Message: [GoogleGenerativeAI Error]: Error fetching from endpoint: [502 Bad Gateway]
Both are on the v1beta endpoint. The 502 has a much longer timeout (5.6s) before failing than the 503 (1.46s), which suggests a routing/gateway issue on Google’s side rather than pure model overload.
We already do backoff-and-retry per the pinned guidance, but at our volume that’s not enough — retries just add latency and still fail during sustained high-demand windows. Is there an actual enterprise/capacity option for the direct Gemini Developer API, similar to Provisioned Throughput on Vertex AI? Our project is currently on Basic support so we can’t file a technical case — any guidance here would help a lot.
los errores 503 en la API de Gemini están ocurriendo últimamente debido a sobrecarga de los modelos, no por fallos de tu configuración. Se trata de un problema de capacidad temporal en la infraestructura de Google, y la solución recomendada es reintentar con exponential backoff o usar un modelo alternativo.