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

Automatically recover from 429 #2

Open
filipsch opened this issue May 1, 2018 · 2 comments
Open

Automatically recover from 429 #2

filipsch opened this issue May 1, 2018 · 2 comments

Comments

@filipsch
Copy link

filipsch commented May 1, 2018

Your package is extremely simple to use, thanks for this!!

When doing repeated document queries to our documentDB instance, I get the following 429 error in an unpredictable fashion (probably because one of our other services is performing actions?):

Error in selectDocuments(connectionInfo, queryText = query, enableCrossPartitionQuery = TRUE) : 
  A 429 error occured during DocumentDB querying. Error Message: Message: {"Errors":["Request rate is large"]}
ActivityId: b2cfdc24-5b03-4eab-b6c8-c84e94d67d79, Request URI: /apps/514defcb-ac21-44e6-a8e0-c7b785523c6c/services/23357e57-84ba-4eb6-adc1-6df21ed8b5b4/partitions/6b5f2f77-b2b3-4dc0-a698-4d4ee891684a/replicas/131681651295792435s/, RequestStats: 
ResponseTime: 2018-05-01T14:21:57.1720496Z, StoreReadResult: StorePhysicalAddress: rntbd://bl4prdddc02-docdb-1.documents.azure.com:14294/apps/514defcb-ac21-44e6-a8e0-c7b785523c6c/services/23357e57-84ba-4eb6-adc1-6df21ed8b5b4/partitions/6b5f2f77-b2b3-4dc0-a698-4d4ee891684a/replicas/131681651295792435s/, LSN: 8841342, GlobalCommittedLsn: 8841341, PartitionKeyRangeId: , IsValid: True, StatusCode: 0, IsGone: False, IsNotFound: False, IsInvalidPartition: False, RequestCharge: 0.38, ItemLSN: -1, ResourceType: Document, OperationType: Query
, SDK: Microsoft.Azure.Documents.Common/1.22.0.0

Is there a way in your package to keep retrying until the query executes? If not, I'm happy to do a PR if you can provide some pointers on where you think this functionality should be added.

Thanks!

@davefrancis
Copy link

Hey, I'm not sure this repo is actively maintained, but I was having a similar issue when I was using it on a project a while back. I submitted a PR, but never heard anything from the maintainer so I closed it. You could check out the code, might be of some use.

@filipsch
Copy link
Author

filipsch commented May 1, 2018

@davefrancis I saw, very useful indeed. I'll probably just fork the package and apply the subset of your changes that I need there. Thanks!

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

2 participants