Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
Hello Somyadeep Shrivastava,
I understand you're experiencing 408 Request Timeout errors when calling the TimeGen-1 model, which is blocking your development.
This is a common issue when experimenting with new endpoints, and your suspicion is correct—it is almost certainly related to service limits.
The key detail you provided is that the service works initially and then begins to fail frequently. This pattern is a symptom of service-side throttling or rate limiting.
Here are a few recommended steps to resolve this and continue your development.
1. Implement Exponential Backoff (Retry Logic)
This is the most important step. Instead of just resending a failed request immediately, you must implement a "retry with backoff" strategy.
If a request fails:
- Wait 1 second, then retry.
- If it fails again, wait 2 seconds, then retry.
- If it fails again, wait 4 seconds, then retry.
This pattern gives the service time to recover and gradually lets your requests through as your quota window resets.
2. Reduce Client-Side Request Frequency
Since this is happening during "experimentation," you are likely calling the model in a rapid loop or in quick succession. Manually slow down your requests. If you are running a script, add a simple time.sleep(1) or time.sleep(2) between calls to ensure you stay under the requests-per-minute limit.
3. Check for Concurrent Requests
The service also has a limit on concurrent requests (how many requests you can have "in flight" at the same time). If your code is using async or multi-threading to send many requests in parallel, you are almost certainly hitting this limit. Try sending your requests sequentially (one at a time) to see if the errors stop.
For Reference:
Please let us know if implementing the retry logic and slowing down the request frequency helps. If yes, kindly "Accept the answer" and/or upvote, so it will be beneficial to others in the community as well.