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

Device update total number of updates per instance count mismatch #228

Closed
ravi-mungalpara opened this issue Oct 21, 2022 · 6 comments
Closed

Comments

@ravi-mungalpara
Copy link

Hi,

I was trying to import updates in azure IotHub. According to the document Total number of updates per instance = 100 but I am able to import up to around 72-75 imports after that I started getting error saying "Error importing update due to exceeded limit".

I used GET endpoint (https://{endpoint}/deviceupdate/{instanceId}/updates?api-version=2021-06-01-preview) to fetch total number of updates but I am getting around 72-75 updates only. Also tried using SDK (Azure.IoT.DeviceUpdate-1.0.0-beta.3) method _DeviceUpdateClient.GetUpdatesAsync without passing any parameter value but still getting around 72-75 updates only.

I am not sure why I am getting limit exceeded error even though I didn't reach the limit. Can you help me figure out what could be the issue ? I will be happy to provide more info.

@eshashah-msft
Copy link
Contributor

@rvmungalpara Investigating the issue

@alancshi
Copy link

Hi @rvmungalpara, it's probably not the most clear from the documentation, but the 100 device update limit is the total maximum number of updates, but there are other restrictions in the same document you reference that you can hit, even before you hit 100 updates. For example, the total number of update providers is 25 (meaning if you can receive a limit error with as few as 26 updates if they all have different providers). Likewise with the number of names per provider.

That said, the error message you are getting should be specific enough for you to figure out the problem (and it seems the error message you got back seems too ambiguous). @devlie can you look into why there is such a generic message returned? @rvmungalpara if you have an operation ID for the import request, we can look specifically into this as well.

@devlie
Copy link
Member

devlie commented Oct 21, 2022

Error importing update due to exceeded limit

That is just the top-level message; there should be another message in the error object that specifies which limit was exceeded.

@ravi-mungalpara
Copy link
Author

@alancshi @devlie Thanks for looking into that issue. I am using only one update provider and max 4-5 different update names during my import workflow. So I believe I am not hitting that 25 update provider/ 25 update names per provider limit. Attached more info around error message probably that could help to investigate further.

  • OperationId: 97181171-4c2f-4aab-a7ee-0003ae65d7d7

Import01

  • OperationId: c1b2b644-64c2-43ea-878d-665b2e0b6c80

Import02

@devlie
Copy link
Member

devlie commented Oct 26, 2022

@rvmungalpara thank you very much for the operationIds. We identified a bug in our import system that causes us to leave orphaned documents in database when user deletes an update very shortly after it is imported. Those orphaned documents are included by the limit calculation, causing the error you're seeing. I have manually cleaned up the database associated with your instance, and you should be able to import up to 100 updates now.

@devlie devlie closed this as completed Oct 31, 2022
@ravi-mungalpara
Copy link
Author

@devlie Same issue we are getting on other environment that we are using for our internal testing.
OperationIds:

  • 2274b580-90ba-4088-ac01-561455b027c7
  • 3483ca3d-b243-432a-8783-774046aeba49
  • 58dcf6e2-1e04-428f-bc20-fce72759dbec

Can you delete orphaned documents from the database ? What will be the long term solution so those orphaned document doesn't get created. Let me know something needs to be done from our side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants