openAI Retrieval Platform intermittent issue

I get what seems to be a random error when I execute:

create_and_poll_file_batches(
vector_store_id=vector_store_id,
file_ids=file_ids,
chunking_strategy={“type”: “auto”}
)

I’m getting the following error:

POST ****** apiopenai.comv1files "HTTP1.1 500 Internal Server Error"
openai.InternalServerError: Error code: 500 - {‘error’: {‘message’: ‘The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID req_1aaf06e627a123c220512a18e3960e9c in your email.)’, ‘type’: ‘server_error’, ‘param’: None, ‘code’: None}}

I am stil facing issues regarding create_and_pool to upload files to the Vector Store. Is it something anyone else is also facing since yesterday evening?

    file = client.files.create(file=open(file_path, "rb"), purpose=assistant)

    vector_store_file = client.vector_stores.files.create_and_poll(vector_store_id=vector_store_id, file_id=file.id)

This is the code example I am using.

For Azure OpenAI:

“file_counts”: “FileCounts(cancelled=0, completed=0, failed=0, in_progress=3, total=3)”,

and for OpenAI python library:
“file_counts”: “FileCounts(cancelled=0, completed=0, failed=1, in_progress=0, total=1)”,

Where as both worked till yesterday 1700 CET

Is this still happening? I was not able to reproduce and the services look healthy. req_1aaf06e627a123c220512a18e3960e9c failed due to a timeout, but I don’t have good indication if that was due to file size or a temporary system issue. If it still reproduces, can you provide additional request ids please?

1 Like

Thanks for your email. I deleted all the files and started a new run. That worked okay. I’ll let you know if I still have the problem.

I usually delete the vector-store after I am done. I was expecting that it would also delete all the files. It doesn’t seem to do that. My question is, do I need to follow the following to delete all the files?

Step 1: Get vector store details

store = client.vector_stores.retrieve(store_id)

Step 2: Save file IDs for later deletion

file_ids = store.file_ids

Step 3: Delete the vector store

client.vector_stores.delete(vector_store_id=store_id)

Step 4: Delete the files manually

for file_id in file_ids:
client.files.delete(file_id)

Please comment. Thanks.

Nabil

This e-mail is for the sole use of the intended recipient(s). It contains confidential information. If you believe it has been sent to you in error, please notify the sender by replying to this e-mail and delete the message. Any disclosure, copying, distribution, or use of this information is prohibited by someone other than the intended recipient.

If you want to delete the files in addition to the vector store that is the type of thing you will need to do. I can store the file_ids on upload if you want to skip step 1, but 3 and 4 remain the same.

Hello, I am still facing issues with uploading files to a vector store Via Azure OpenAI, and OpenAI library itself.

{
    "id": "vs_ZoFsR2Uk6FlA76cXqgOD1qws",
    "created_at": 1743147643,
    "file_counts": "FileCounts(cancelled=0, completed=0, failed=1, in_progress=0, total=1)",
    "last_active_at": 1743147643,
    "metadata": {},
    "name": "TestVectorStore",
    "object": "vector_store",
    "status": "completed",
    "usage_bytes": 0,
    "expires_after": null,
    "expires_at": null,
    "_request_id": "d74d32c3-046b-468a-ad89-8e1c1fd2291a",```
}
the file is a simple .txt file and it just fails to upload the file with no error message.

I’m sorry to hear that Varun. Azure OpenAI is managed by a team at Microsoft and I don’t have any insights into what is going on there nor a way to help with their system.

2 Likes

It seems like I’m still having the problem. Here is the tail end of my output:

2025-03-28 18:48:41,074 - INFO - Creating file batch for vector store vs_67e74b7ca8288191a5bd6dd5c9c20d21 with 400 files (attempt 5/5)
vector_stores/vs_67e74b7ca8288191a5bd6dd5c9c20d21/file_batches "HT1.1 500 Internal Server Error"
2025-03-28 18:48:47,793 - INFO - Retrying request to vector_stores
vs_67e74b7ca8288191a5bd6dd5c9c20d21/file_batches in 0.426895 seconds
2025-03-28 18:48:51,688 - INFO - **** Request: POST :
/v1/vector_stores/vs_67e74b7ca8288191a5bd6dd5c9c20d21/file_batches "1.1 200 OK"
2025-03-28 18:48:55,780 - INFO - **** Request: GET ht
:
/v1/vector_stores/vs_67e74b7ca8288191a5bd6dd5c9c20d21/file_batches/vsfb_4a3989797e354141b27deac523366ce6 “HTTP/1.1 500 Internal Server Error”
2025-03-28 18:48:55,781 - INFO - Retrying request to vector_stores
vs_67e74b7ca8288191a5bd6dd5c9c20d21/file_batches/vsfb_4a3989797e354141b27deac523366ce6 in 0.467320 seconds
2025-03-28 18:48:58,346 - INFO - HTTP Request: GET ht
**:*/v1/vector_stores/vs_67e74b7ca8288191a5bd6dd5c9c20d21vsfb_4a3989797e354141b27deac523366ce6 “HTT**1.1 200 OK”
2025-03-28 18:48:58,348 - INFO - Successfully created file batch with ID: vsfb_4a3989797e354141b27deac523366ce6
File batch created successfully with ID: vsfb_4a3989797e354141b27deac523366ce6
Status: completed

You should post here : Questions - Microsoft Q&A

Thank you so much for your response.

Using OpenAI API (non-Azure) and having this issue as well. Can create stores via API or in Dashboard (Storage) but they do not show after creation, even though they return a vs_id. Very intermittent as it will work for 1-2 minutes, but stop working for 1-2 hours.

Some of them JUST started showing up, nearly 3 1/2 hours later, with the original creation time. These are extremely small stores, so no idea why it’s coming up so many hours later.

1 Like

Thanks for surfacing this! We’ve seen some intermittent issues with the Retrieval (Vector Store) API — including timeouts and 500 errors when uploading or polling file batches. These often resolve on retry, but we’re still monitoring.

If it happens again:

  • Retry after a short delay
  • Include the request_id if you contact support@openai.com
  • For Azure OpenAI, issues can be addressed via Microsoft

And yep, deleting a vector store doesn’t remove its files. You’ll need to delete those manually.

Appreciate everyone’s patience!

Hello, we are facing issue that seems to be releated to one described above.

  1. All files are successfully created with openAi.files.create({ file, purpose: “assistants” })

  2. Attempt to associate them with vector store via openAi.vectorStores.fileBatches.createAndPoll(storeId, { file_ids: fileIds }, { pollIntervalMs: 1500 }) results in status “complete” when it comes to batch itself, but vectorization of files themself failes though (“failed”: 367 in file_counts and upon separate check via openAi.vectorStores.files.list(newVectorStore.id)).data there are “An internal error occurred.” messages).

Exact count of files being uploaded is 3664 (in batches each consisting of max. 100 items) and vectorization request happen in batches of max. 500 items per each. No exception is retrieved in relation to limits this way.

Thank you for information,
Adam

Hi Adam!

This usually happens when some files in the batch can’t be parsed or chunked, even though fileBatches.createAndPoll(...) reports completed. Common causes: unsupported formats (e.g., .doc instead of .docx), non-UTF-8 encoding, or token-dense content that exceeds limits.

We generally recommend:

  1. List files in the vector store after the batch.
  2. Retry only the ones with status: failed using vectorStores.files.createAndPoll(...).
  3. Before retrying, convert to supported formats, ensure UTF-8, and split very large files.

If failures persist, feel free to share recent request IDs from those retries so we can check our backend logs for any insights.

2 Likes

I retired to previous solution at the end - merging files into lower amount of larger ones (max. 1MB/file). That works fine.

Other thing that I tried was usage of mentioned approach before with createAndPoll() and batching files for vectorization in lower amounts (10 items/batch). That worked, but due to large quantity of files in sum (>3000), its not reasonable and results in very slow process in total consisting of >300 batches (waiting for completion of each). Just tried for interest when experimenting in attempt to overcome the problem.

Anyway, all files are of same type with same extension (.md), UTF-8 encoded and small (<100kB, no explicit message about limitions was returned like in other scenarios).

I think that there can be some problem releated to server overload since quantity of 500 files ids even though being in limit results in a problem. 100 ids same. 10 is ok. It can be probably simply simulated in isolation with multiple batches of 500 file ids (with each awaited till completion). I will report req. ID in the future in case same or seemingly closely related issue will arise. There were also some information leaks for failed request from Amazon Dynamo DB behind your infrastructure probably. I encountered them during experimentation, but dont know which req. exactly it was. Just want mention it.