https://www.boundaryml.com logo
🟡 Request timed out from HTTP API and received a ...
# questions
t
Hey, Facing a request timed out from HTTP api. Logs:
Copy code
---REQUEST OPTIONS---
    max_tokens: 4096
    ---ERROR (Timeout (408))---
    Request timed out
Response:
Copy code
com.boundaryml.baml_client.ApiException: Message: Bad Gateway
HTTP response code: 502
HTTP response body: {
  "error": "client_error",
  "message": "\"Request timed out\"",
  "documentation_url": "https://docs.boundaryml.com/get-started/debugging/exception-handling"
}
Saw this as well in log: Client: AzureOpenAI () - 30000ms
Java side:
Copy code
private final ApiClient defaultClient = Configuration.getDefaultApiClient();
  private final DefaultApi apiInstance = new DefaultApi(defaultClient);

  @PostConstruct
  public void init() {
    defaultClient.setReadTimeout(300000);
    defaultClient.setWriteTimeout(300000);
    log.info("AI service URL: {}", aiClientUrl);
    apiInstance.setCustomBaseUrl(aiClientUrl);
  }
BAML version "0.212.0"
a
Did it work before?
Which model do you use?
What client language are you using? Java openapi?
t
Yes its working but this was one of scenario (maybe due to large data ask). Azure open ai gpt4o Java
a
https://github.com/BoundaryML/baml/pull/2698, will be fixed in 0.213.0, coming out tomorrow morning
t
Cool thanks
@aaronv (BAML) Can this timeout be configurable from client side ?
a
t
Thanks, Ohh so even by changing this I can get away with this issue
a
yep!
i just released 0.213.0 which sets the default timeout to 5min from 30secs