Since late night on June 2nd, I've been getting 503 responses from my Apigee proxy endpoints that call the OpenAI API. The rate varies from 25%-100% of the time. I didn't make any proxy or configuration changes recently. I'm not hitting OpenAI API limits.
I have different endpoints for "chat completions" and "speech recognition" that call OpenAI, and they're both affected. APIs that don't call OpenAI's API (e.g. they call services on Azure instead) don't have this issue.
The message I get during CORSResponseOrErrorFlowExecution during postflow is:
Status: 503
Reason phrase: Service Unavailable
Body: {"fault":{"faultstring":"The Service is temporarily unavailable","detail":{"errorcode":"messaging.adaptors.http.flow.ServiceUnavailable","reason":"TARGET_CONNECT_TIMEOUT"}}}
I've tried:
Do you recommend any other debugging steps, or any kind of network config I can investigate? Might moving to Nat IPs help?
Also, is there any way for you to check that connections to "api.openai.com" work reliably? I'm not getting far with OpenAI's support bot but they suggested:
Hi @jamesw96 ,
It sounds like the issue may be with outbound connectivity from Apigee to OpenAI. A few quick tips:
Try using NAT IPs instead of ephemeral ones โ this often helps with stability.
Make sure outbound traffic to api.openai.com (TCP 443) is fully allowed, with no TLS/SSL inspection or DNS issues.
If direct calls from your laptop work, the problem is likely in the Apigee network path.
A Cloud NAT gateway can help if you need consistent IPs and better control.
Unfortunately I couldn't get this to work following the suggestions above. I also submitted a Google Cloud support ticket which was a useless exercise as the support person was just telling me untrue things and didn't know what he was doing with Apigee. I ended up changing from the OpenAI API to Azure OpenAI, which is working just fine.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |