question

MaithreyiRajagopalan-3187 avatar image
0 Votes"
MaithreyiRajagopalan-3187 asked AnuragSharma-MSFT commented

Azure Cosmos DB throws exception on GetItemQueryStreamIterator

Hi Team,

We are using Azure Cosmos V3.19 and when we run GetItemQueryStreamIterator and we have not seen this problem until recently.

Microsoft.Azure.CXP.ES.Providers.CosmosDb.CosmosDbProviderException: Error querying collection using sql. Database id: CustomerInsights and Collection id: Preferences ---> Microsoft.Azure.Cosmos.CosmosException: Response status code does not indicate success: InternalServerError (500); Substatus: 0; ActivityId: 00000000-0000-0000-0000-000000000000; Reason: (Index was outside the bounds of the array.);
at Microsoft.Azure.CXP.ES.Providers.CosmosDb.CosmosDbProvider.<RunCosmosDbOperation>d_50`1.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.Azure.CXP.ES.Providers.CosmosDb.CosmosDbProvider.<RunCosmosDbOperation>d
_50`1.MoveNext()

The continuationToken is left at default, so I believe it gets passed as null. What could potentially cause this problem?

Regards,
Maithreyi

azure-cosmos-db
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MaithreyiRajagopalan-3187, welcome to Microsoft Q&A forum.

Can you please try explicitly passing null for continuation token instead of default value?

0 Votes 0 ·

This is only happening on some documents and not all. This code passing a default null has not changed in a really long time. Any other reason that could cause this?

0 Votes 0 ·
AnuragSharma-MSFT avatar image AnuragSharma-MSFT MaithreyiRajagopalan-3187 ·

Thanks for replying back. With v3 similar issue is reported sometime back where in user passed the continuation token null and it started working.

Index was outside the bounds of the array

However as you mentioned this is the issue with some docs only, would it be possible for you to pass the code piece which is giving error and also couple of documents where the code works and fails? That way I can try checking with product group as well if we cannot figure out ourselves.


0 Votes 0 ·

0 Answers