Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout APIConnectionError during Large File Upload (200MB) - ECONNRESET #31148

Open
SuMyatHlaing30 opened this issue Sep 18, 2024 · 7 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team OpenAI question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@SuMyatHlaing30
Copy link

Describe the bug
When attempting to upload a large file (200MB) to the Azure OpenAI API using the OpenAI Node.js SDK, the request fails with an ECONNRESET error. The error seems to occur when the upload exceeds a certain size, as smaller files upload without issue.
https://platform.openai.com/docs/api-reference/files/create

To Reproduce

 const file = await openai_client.files.create({
      file: fs.createReadStream(path.join(__dirname, './uploads/testfile.pdf')),
      purpose: 'assistants',
    });

Expected behavior
The file should upload successfully without a connection reset error because there is a description in api documentation like - Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 100 GB.

Additional context
Additional Info:

The issue only occurs with larger files (200MB+).
Smaller files upload successfully.
Node.js version: 20
OpenAI SDK version: V2

APIConnectionError: Connection error.
at AzureOpenAI.makeRequest (...\node_modules\openai\core.js:304:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runThread (...\fileTestOpenai.js:23:16)
at async main (...\fileTestOpenai.js:19:5) {
status: undefined,
headers: undefined,
request_id: undefined,
error: undefined,
code: undefined,
param: undefined,
type: undefined,
cause: FetchError: request to https://...openai.azure.com//openai/files?api-version=2024-07-01-preview failed, reason: read ECONNRESET
at ClientRequest. (...\node_modules\node-fetch\lib\index.js:1501:11)
at ClientRequest.emit (node:events:517:28)
at TLSSocket.socketErrorListener (node:_http_client:501:9)
at TLSSocket.emit (node:events:529:35)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
}

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 18, 2024
@jeremymeng jeremymeng added Client This issue points to a problem in the data-plane of the library. OpenAI labels Sep 18, 2024
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Sep 18, 2024
@deyaaeldeen
Copy link
Member

Hi @SuMyatHlaing30 Thanks for opening this report! I am not able to repro this issue using API version 2024-08-01-preview and a resource in the Sweden Central region. Could you please share details about the resource and the API version you're using. I would also encourage you to open a support ticket. To open a support ticket, please refer to the guide here. In the meantime, please feel free to reach out if you have any other questions!

@deyaaeldeen deyaaeldeen added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Oct 1, 2024
Copy link

github-actions bot commented Oct 1, 2024

Hi @SuMyatHlaing30. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@SuMyatHlaing30
Copy link
Author

Hi @deyaaeldeen
I am using resource :

  • US Region
  • deployment = "gpt-4o"
  • API Version = "2024-07-01-preview"

When I upload file in Azure Openai Studio, showing file size should be less than 200 MB.
image

@github-actions github-actions bot added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. labels Oct 2, 2024
@deyaaeldeen
Copy link
Member

@SuMyatHlaing30 I am not entirely sure what did you mean by "US Region". Please checkout the availability table in https://learn.microsoft.com/azure/ai-services/openai/concepts/models#assistants-preview for more information on what regions to use with what models.

@deyaaeldeen deyaaeldeen added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Oct 2, 2024
@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Oct 2, 2024
Copy link

github-actions bot commented Oct 2, 2024

Hi @SuMyatHlaing30. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@SuMyatHlaing30
Copy link
Author

East US region.

@github-actions github-actions bot added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. labels Oct 4, 2024
@SuMyatHlaing30
Copy link
Author

are there any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team OpenAI question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants