# Constant timeout errors when calling gemini

**URL:** <https://discuss.ai.google.dev/t/constant-timeout-errors-when-calling-gemini/100038>\
**Category:** Gemini API\
**Tags:** api, gemini\
**Created:** [August 26, 2025, 12:03pm UTC](https://discuss.ai.google.dev/t/constant-timeout-errors-when-calling-gemini/100038 "2025-08-26T12:03:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sprout\_head](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/sprout_head/32/35291_2.png) [@sprout\_head](https://discuss.ai.google.dev/u/sprout_head)\
**Post date:** [August 26, 2025, 12:03pm UTC](https://discuss.ai.google.dev/t/constant-timeout-errors-when-calling-gemini/100038/1 "2025-08-26T12:03:20Z")

</div>

Context -

1. We make high concurrent api calls of almost 500 - 600
2. We are not reaching the token limit or request limit

Issues -

1. Constant timeout errors when calling azure ( openai ) & Gemini
2. LIbraries used - agents SDK by openai, ADK by Google gemini
3. Tried different models, still same result.
4. Tried with different connect timeouts, still same result.

---

<div class="post-metadata">

**Author:** ![Krish\_Varnakavi1](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/krish_varnakavi1/32/56962_2.png) [@Krish\_Varnakavi1](https://discuss.ai.google.dev/u/Krish_Varnakavi1)\
**Post date:** [August 27, 2025, 7:21pm UTC](https://discuss.ai.google.dev/t/constant-timeout-errors-when-calling-gemini/100038/3 "2025-08-27T19:21:48Z")

</div>

Hi @sprout_head,

Welcome to the Google AI Forum! 🎊 🎊

The fact that all services are failing specifies that there is an issue on your end.. Timeout error happens for multiple reasons.

1. Networking bottlenecks: When Temporary Ephemeral ports your OS assigns when making outbound connections don’t get closed in time can cause this issue.
2. Firewall/Proxy/Load Balancer Timeouts: If your requests pass through an internal firewall, proxy, or load balancer, these devices often have their own default idle connection timeouts.
3. Resource Exhaustion on Your Server: High CPU can cause requests to be processed slowly on your end
4. Code/Application Specific Issues: Check if there any blocking operations in your code path that get executed for each concurrent request such as Database calls, local file I/O, etc.

Please identify which issue is being caused and try again.

Happy Coding 🙂
