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…