APi Frequently hangs gives Timeout error!

I stream response and have tried with timeout setting 30.0 , 60.0 and even 120.0
OpenAI(api_key = os.getenv(“OPENAI_API_KEY”),timeout=30.0)

Eventually I have to set max retries to 0 and use fallback model.

I have tried will all these similar settings while setting streaming = True

client = OpenAI(api_key = os.getenv("OPENAI_API_KEY"),timeout=30.0, max_retries=1)

client = OpenAI(api_key = os.getenv("OPENAI_API_KEY"),timeout=60.0, max_retries=0)

client = OpenAI(api_key = os.getenv("OPENAI_API_KEY"),timeout=80.0, max_retries=0)

After adjusting the timeout settings, things seemed to improve temporarily, but then I began receiving timeout errors again.

When I make changes, memory utilization also fluctuates.


I’m running into a timeout error specifically on my third message using 3.5 Turbo with steaming. Something is wrong here.