Upload Error in Azure OpenAI API vs Playground (Azure OpenAI Studio) - Default Time Limit?

Su Myat Hlaing 180 Reputation points
2024-12-18T02:17:19.63+00:00

Description:
I'm encountering an issue while uploading PDF files to the Azure OpenAI API using the Assistant (File Search) feature, compared to the Azure Playground UI. I understand from the OpenAI documentation that up to 10,000 files can be uploaded for the Assistant's File Search. However, I am only testing with 50 files, and I still encounter errors in the API while the Playground UI works with larger limits.

Observed Behavior

Upload Error in API

  • 50MB: 50 files → 10 minutes (error)
    • 100MB: 40 files → 14 minutes (error)
      • 200MB: 30 files → 15 minutes (error)
      Can Upload in Playground (Azure UI)
      - **100MB**: 40 files → **23 minutes**
      
         - **120MB**: 50 files → **43 minutes**
      
         **Can Upload in API** *(smaller success thresholds)*
      
            - **50MB**: 40 files → **3 minutes**
      
               - **100MB**: 35 files → **10 minutes**
      
                  - **200MB**: 20 files → **7 minutes**
      

Error Details

I receive the following error:

APIConnectionError: Connection error.
    at AzureOpenAI.makeRequest (xxx\node_modules\openai\core.js:323:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async xxx.js:2654:36
    at async Promise.all (index 16)
    at async xxx.js:2664:32 {
  status: undefined,
  headers: undefined,
  request_id: undefined,
  error: undefined,
  code: undefined,
  param: undefined,
  type: undefined,
  cause: FetchError: request to https://xxx.openai.azure.com//openai/files?api-version=2024-07-01-preview failed, reason: read ECONNRESET
      at ClientRequest.<anonymous> (xxx\node_modules\node-fetch\lib\index.js:1505:11)
      at ClientRequest.emit (node:events:513:28)
      at TLSSocket.socketErrorListener (node:_http_client:494:9)   
      at TLSSocket.emit (node:events:513:28)
      at emitErrorNT (node:internal/streams/destroy:157:8)
      at emitErrorCloseNT (node:internal/streams/destroy:122:3)    
      at processTicksAndRejections (node:internal/process/task_queues:83:21) {
    type: 'system',
    errno: 'ECONNRESET',
    code: 'ECONNRESET'
  }
}


Questions

  1. Is there a default time limit or timeout setting in the API that could be impacting the upload of files?
  2. Why am I seeing a difference between the Playground (UI) upload success rate and the API behavior?
  3. Are there additional file size or time restrictions for the Azure OpenAI API when uploading files for Assistant File Search?
  4. Is the error related to DNS (getaddrinfo ENOTFOUND), and how can I resolve this issue in my API requests?

Testing Details

  • I am testing with only 50 files (far below the 10,000 file limit mentioned in OpenAI documentation).
  • Platform: Azure OpenAI Service - Assistant (File Search)
  • Upload Format: PDF files
  • Tooling: Node.js API integration
  • Region: (Specify region if applicable)

I appreciate any insights or suggestions on whether timeout settings, file size limits, or configuration differences could be causing this issue.

Thank you!


Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,081 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 35,971 Reputation points Moderator
    2024-12-18T08:51:22.48+00:00

    Su Myat Hlaing Greetings!

    I understand your concern.

    ECONNRESET errors indicate that the connection was forcibly closed by the server. This could happen if there is a network instability or server-side restrictions on connection duration.

    Did you try implementing a retry logic to handle transient network issues?

    Is there a default time limit or timeout setting in the API that could be impacting the upload of files?

    AFAIK, Azure OpenAI service has a maximum file size limit of 512MB per file for uploads and 200 MB via Azure AI Foundry portal. However, there isn't a specific timeout limit mentioned in file uploads. The timeout error you're encountering might be due to network latency or other factors affecting the upload process.

    Why am I seeing a difference between the Playground (UI) upload success rate and the API behavior?

    This depends on your network. The UI might manage requests differently, such as by batching them that reduces the likelihood of hitting server-side limits or timeouts.

    Are there additional file size or time restrictions for the Azure OpenAI API when uploading files for Assistant File Search?

    You can find more details for applicable limits on Azure OpenAI Service quotas and limits

    User's image

    Is the error related to DNS (getaddrinfo ENOTFOUND), and how can I resolve this issue in my API requests?

    To isolate the issue, try using a different DNS server or IP address to see if that resolves the issue.

    If that doesn't help, For a deeper investigation and immediate assistance on this issue, please file a support request @ https://aka.ms/azsupt?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.