Timeline for Form Digest expires while copying 1M List Items
Current License: CC BY-SA 4.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 23, 2021 at 17:32 | comment | added | Vivek | Dylan can you please help me with this? sharepoint.stackexchange.com/questions/295503/… | |
Jul 6, 2021 at 6:27 | comment | added | Vivek | Makes complete sense to me Dylan , Will work on handling 429 error going forward :) | |
Jul 5, 2021 at 18:49 | comment | added | Dylan Cristy |
Not sure what you can do about 500 errors, since that is an "internal server" error, but 429 is "Too Many Requests". If you catch one of those errors and determine it is 429, you could check to see if it has a Retry-After header which would tell you how long you need to wait until starting to make requests again. Then... just wait that long, and start the process up again.
|
|
Jul 5, 2021 at 14:04 | comment | added | Vivek | Hi Dylan, 90% list items were copied and the copying stopped because of 429 and 500 errors, However had to modify the code to copy the remaining 3k items. Thank you so much for the help :) | |
Jul 5, 2021 at 14:02 | vote | accept | Vivek | ||
Jul 3, 2021 at 14:34 | comment | added | Vivek | Let us continue this discussion in chat. | |
Jul 3, 2021 at 14:10 | comment | added | Vivek | Dylan , I got to the point where 67K items were copied and it threw a 429 error , still a long way to go. I added UpdateFormDigest(_spPageContextInfo.webServerRelativeUrl, _spFormDigestRefreshInterval); just before the post AJAX call. Thank you very much for helping me out with my battle and also for the detailed explanation. Would try these suggestions and keep you posted | |
Jul 2, 2021 at 20:09 | history | edited | Dylan Cristy | CC BY-SA 4.0 |
added code example suggestion
|
Jul 2, 2021 at 19:00 | comment | added | Dylan Cristy |
And does it work? Does your $.each() loop from the other code "wait" for each call to UpdateListItemUsingItemId to complete before moving on to the next item?
|
|
Jul 2, 2021 at 18:54 | comment | added | Dylan Cristy |
Wait... are you really using async: false to make your $.ajax calls synchronous???
|
|
Jul 2, 2021 at 17:35 | comment | added | Vivek | Dylan I am using the code you suggested here sharepoint.stackexchange.com/questions/290646/…. I was able to get all the items , However post operation throws the 403 error | |
Jul 2, 2021 at 17:30 | comment | added | Dylan Cristy |
How are you working through your 1M+ items? Are you just running some kind of loop over them and calling UpdateListItemUsingItemId on each one? Or are you using some kind of control / throttling mechanism in your code to make sure each call to update (create?) a list item completes before moving on to the next one?
|
|
Jul 2, 2021 at 17:21 | comment | added | Vivek | Thanks Dylan. I added this before the ajax call and its still failing with 403 errors setInterval(function() { UpdateFormDigest(_spPageContextInfo.webServerRelativeUrl, _spFormDigestRefreshInterval); }, 5 * 60000); Can you suggest the best possible way to catch the exception and continue from where we last left? | |
Jul 2, 2021 at 17:18 | history | answered | Dylan Cristy | CC BY-SA 4.0 |