How to reduce 504 errors

I am getting a lot of 504 Deadline Exceeded errors for prompts containing large text (500K tokens). Is there a way I can change the deadline length?

Solution from How to manage prompt/context complexity v. 504 Deadline - #2 by sps.

Suggestion: this question could have been answered proactively by adding a reference to the “timeout” parameter to the text of the 504 error message. When I was a product manager, I always made a review of error messages an early priority, since edits are a virtually zero-cost way to impact the user at “point of distress”. OpenAI does this a lot, I’ve noticed. @Logan_Kilpatrick

1 Like

@Fred_Zimmerman I’d also recommend marking that post as solution so other community members and visitors can find it.