Runs get stuck in "queued" status

Hi. Since around August, runs across several accounts are getting stuck in the “queued” status forever, making the whole conversational thread basically a dead place - it’s impossible to add new messages. I also tried to cancel the run - it gets stuck in the “cancelling” status and the thread is still unusable.
When I look at the messages in thread via /v1/threads/thread_id123/messages the very last message from a user is shown as not connected to any runId (see example below) as well as any assistant.

		{
			"id": "msg_WtRlTIYrUw5cCzWpH9doNNx0",
			"object": "thread.message",
			"created_at": 1726673731,
			"assistant_id": null,
			"thread_id": "thread_FQI7tCWLm44IGtjinYwp4EEK",
			"run_id": null,
			"role": "user",
			"content": [
				{
					"type": "text",
					"text": {
						"value": "Today is Wednesday, 2024-09-18, 20:35. Хочу узнать насчет завтрака",
						"annotations": []
					}
				}
			],
			"attachments": [],
			"metadata": {}
		},
		{
			"id": "msg_o7wXj2jNJX7xaomfuxztbGkS",
			"object": "thread.message",
			"created_at": 1726673458,
			"assistant_id": "asst_pGxma3vV9pbPZvJx960tDTgI",
			"thread_id": "thread_FQI7tCWLm44IGtjinYwp4EEK",
			"run_id": "run_5d2qcrqo8k5j08IyIXDCUZB9",
			"role": "assistant",
			"content": [
				{
					"type": "text",
					"text": {
						"value": "dummy response from assistant",
						"annotations": []
					}
				}
			],
			"attachments": [],
			"metadata": {}
		},

It happens randomly, but every time prior to the issue the response time from OpenAI for the chain of “createMessage” and “createRun” requests is long enough for my server to break the connection (60+ sec).

Again, the biggest problem it brings is that the thread becomes unusable - if the assistant is playing a role of a customer service representative it’s a dead-end for the conversation (that I have to handle differently).

From the topics on the forum I can see that I’m not alone, so hoping to help to make OpenAI devs aware of the issue and seek for any advice. Much appreciated!

2 Likes

This has started to happen for me as well within the last week. Has there been any updates or follow-ups on it?

Update: happening more and more frequently. Used to get through 2-3 turns, now it’s failing on the first run through.

Even had an incident from last night where a saved run_id when sent back to OpenAI for status check, tells me that that no run found with id ...

Just stays in queued until it eventually expires…

Now they’re just failing for no reason (no change to the code)…

"last_error": {
    "code": "server_error",
    "message": "Sorry, something went wrong."
  },

If only I didn’t have an important pitch first thing in the morning…:sweat_smile:

I can confirm that runs are failing for me as well. For me they are failing after submitting tool call results. Is it the same on your end?

3 Likes

I don’t even get that far - removed everything except just prompt and additional_instructions – but still gets stuck in queued or fails altogether.

Glad to know it’s not just me!

1 Like

Can you share a run id that failed for you?

1 Like

I can share lots :slight_smile:

run_yl1xvkSA5FAbUexJeoiDCY1P
run_gV4TQRRtPQjgpnMmLTnrnjvJ
run_2dt4OaKOtZQ3rhOwBZUah4ez

This is the most recent one that just stuck in queued:

run_JuE6DhgfU8gAQpNyONfGIlNt

The following one is weird because it says the run_id doesn’t exist (even though its saved off of the API response…):

run_2lCqGVoaEFqASBoI4yiWmlZP

And I just had a basic ChatCompletion timeout after 30sec…

1 Like