API aborts my connection without a reason - anything I can do?

I am using ‘train_3_motive_en.csv’ model to generate some texts since yesterday. Yesterday it ran well. However, I am getting this error for the last 7 hours:
openai.error.APIConnectionError: Error communicating with OpenAI: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’))

Any idea? what is going on

Best Regards,
Zahurul

I’m using the chat completion endpoint, currently with the gpt-3.5-turbo. Before yesterday, for a few weeks now, I’ve been running dozens of requests every hours without any issues. Yesterday, about half of them started failing with the same APIConnectionError that’s been reported here. Today, most of them, around 80% of the requests are failing with that error.

Shouldn’t the status.openai.com page reflect that issue on the API?

1 Like

Hi @AgusPG
I agree with you, catching generic expression is a bad engineering practice and it can have pretty bad consequences if done in software developing. My solution was more suitable for an NLP researcher looking for a quick fix and who just wants the output results to analyse offline. Being a researcher but with a previous developer background I see what you mean, but I’ve also seen a lot “worse” in research code than just catching a generic expression, in order to get things to work in the short term. Definitely not advisable for a scalable application, and if you have a live app with real users then my solution is not for you. And thanks for pointing out aiohttp_retry, I’ll look into it :+1:

2 Likes

I’m also still getting tons of connection errors, timeouts and 502s, even after yesterday’s fix. Backoff helps, but my requests often retry 3+ times before my serverless functions time out…

Oh yeah, absolutely. If you can work offline and do not need real-time, I agree that you can be more flexible as regards the software development part of your app :slight_smile:.

One observation I’m curious if any of you have witnessed…

Context: I’m using the text completion API (not chat) and my application built to iterate through various text, calling the API each time.

Observation: When I run this app/code it will work for the first 4-9 API calls, executing each in < 1 s, and then subsequent API calls will either be extremely slow (>90s) or fail with the exception in this thread.

Has anyone else seen this behavior? It seems like there is some unofficial throttling going on.

1 Like

This could be true now you mention it

We run a chained query of 10 prompts. We often get an issue near the end of the chain. We catch it and retry and it continues after a short delay

Hadn’t considered it up to now

1 Like

I am receiving this issue as well. Worse still, despite the API closing my connection without response I have been charged regardless!!

I’m using GPT-4 and getting close to the maximum token limit, which I believe has something to do with it. When I just run the test code that the API documentation suggests it runs flawlessly. Very strange!