[Critical] Over 25% Assistant API Request Timeout Randomly

I am currently experiencing frequent timeouts when interacting with the Assistant API. I try some experiment for GET request only, and approximately 25% of these requests are timing out, which significantly disrupts my workflow. This issue becomes particularly problematic during processes that involve a series of actions, such as appending messages, initiating runs, and then retrieving the results. The timeouts are causing the entire process to stall, leading to inefficiency and uncertainty regarding the completion of tasks.

Test Script:
(For quick demo, I just use 10 seconds for timeout threshold. Since the normal response should be finished in 1 second, I think 10 seconds should be enough for GET request)

url = f'https://api.openai.com/v1/threads/{THREAD_ID}/runs/{RUN_ID}'

times = 20
timeout_count = 0
success_count = 0
sum_response_time = 0

for i in range(times):
    try:
        start_time = time.time()  
        response = requests.get(url, headers=HEADERS, timeout=10)  
        end_time = time.time()  
        
        response_time = end_time - start_time
        sum_response_time += response_time
        success_count += 1
        print(f"Attempt {i+1}: Response time = {response_time} seconds")

    except requests.exceptions.Timeout:
        print(f"Attempt {i+1}: The request timed out after 10 seconds.")
        timeout_count += 1
    except requests.exceptions.RequestException as e:
        print(f"Attempt {i+1}: An error occurred: {e}")
    time.sleep(1)

print(f"Number of successful requests: {success_count}/{times}")
print(f"Number of timeouts: {timeout_count}/{times}")
print(f"Average response time: {sum_response_time/success_count} seconds")

Outcome:

Attempt 1: Response time = 0.2735610008239746 seconds
Attempt 2: Response time = 0.2655370235443115 seconds
Attempt 3: The request timed out after 10 seconds.
Attempt 4: Response time = 0.2678711414337158 seconds
Attempt 5: The request timed out after 10 seconds.
Attempt 6: Response time = 0.2714729309082031 seconds
Attempt 7: The request timed out after 10 seconds.
Attempt 8: Response time = 0.2739229202270508 seconds
Attempt 9: The request timed out after 10 seconds.
Attempt 10: Response time = 0.28916406631469727 seconds
Attempt 11: Response time = 0.2552638053894043 seconds
Attempt 12: Response time = 0.31940197944641113 seconds
Attempt 13: Response time = 0.5801379680633545 seconds
Attempt 14: The request timed out after 10 seconds.
Attempt 15: Response time = 0.6132516860961914 seconds
Attempt 16: Response time = 0.270158052444458 seconds
Attempt 17: Response time = 0.27813124656677246 seconds
Attempt 18: Response time = 0.263901948928833 seconds
Attempt 19: Response time = 0.2753560543060303 seconds
Attempt 20: Response time = 0.278109073638916 seconds
Number of successful requests: 15/20
Number of timeouts: 5/20
Average response time: 0.3183493932088216 seconds
13 Likes


Same problem. And I try to modify the assistant and got internal errors.

1 Like

I too am receiving issues with timing out in assistants.
“Function execution took 540000 ms, finished with status: ‘timeout’” in my cloud function.

3 Likes

I’m having exactly the same issue. I tried even switching the models to gpt-3.5-turbo-0125 and gpt-3.5-turbo-1106 but no luck.

Almost 50% of my API calls are vanished. Can someone please help us here.

2 Likes

Same here. Lots of timeouts, and generally poor performance at basic tasks like retrieving some text from a small file.

Is there a way to report issues like these?

2 Likes

Looks like the issue persist even in the Assistant playground. Anyone from OpenAi team help us on this here?

1 Like

Yes, ASAP please! My whole app isn’t functioning due to this issue.

2 Likes

Same issue I am facing. I called the API and not receiving response any single time. After some data, API breaks and return timeout error.

2 Likes

Yes it seems to be the assistants API only. I switched my app over to chat completions and it seems to be working ok at the moment. Assistants is broken.

Even I am facing same issue…the code which was running perfectly yesterday doesn’t respond to my queries now

Does anyone have a workaround for this issue? It’s becoming more critical for us.

same issue, on the Assistant API, more or less same amount of timeout.

increasing the timeout(s) on our side does nothing as absolutely nothing come back until the network itself decide that it’s enough.
(we tried up to 2 minutes of network timeout)

issue partially negated by coding around the timeout for retries, but not all the code could been modified on short notice.

we now lose only 10% of the processes instead of the previous 95%.

@OpenAI : did part of your LB is hitting a dead cluster ?

I have the same problem with assistant API. In case it helps, as a work around, setting a timeout in the run retrieve request fix the issue sometimes…

client.beta.threads.runs.retrieve(thread_id=user.thread_id, run_id=run.id, timeout=10)

Same, I was getting almost 40% of timeouts and now all 100%. It is totally corrupted

Same here. Our app mainly utilizes the thread and run API and we have a 30s timeout–which had sufficed before but today the API fails to response in time.

I started seeing Assistant API call feezes about a week ago. Random calls related to assistants, threads, runs just hang (using Python SDK) forever without even a timeout exception. I haven’t seen any topics about that on the Forum so I have been looking for the root cause in my code. I increased the run status check interval from 1 second to 5 seconds, this helped until yesterday. And it is much worse today. It must be something on the API side.

you need to rewrite the code to use chat completions. chat completions is working. use the same prompt as you do in assisstants. no retrieval though.

https://platform.openai.com/docs/guides/text-generation/chat-completions-api

1 Like

Woke up to multiple dms about our assistants not working and can confirm we are seeing these exact same timeout issues. Started probably mid-day yesterday. Turning in to a big outage for us.

Based on local testing, starting a new thread seems to work fine but any follow up messages time out completely.

1 Like

I understand that OpenAI actively seeks feedback on beta features like those mentioned in this topic.

https://platform.openai.com/docs/assistants/how-it-works#:~:text=The%20Assistants%20API%20is%20in%20beta%20and%20we%20are%20actively%20working%20on%20adding%20more%20functionality.%20Share%20your%20feedback%20in%20our%20Developer%20Forum!

Please share your thoughts and feedback on the Assistant functionality and function calls here.

I am also facing the same problem. The whole system has collapsed. I can’t get answers to queries. Is there a statement from openAI regarding this issue?