FrontDoor API Item Limit Exceeded Despite Smaller Chunk Size

Created on 29 March 2023, over 1 year ago

Calls to the Purge API can still exceed the 100 item limit if multiple API requests are received too quickly. This was noticed when running the drush updatedb command.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States alan.wallace

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @alan.wallace
  • πŸ‡ΊπŸ‡ΈUnited States alan.wallace
  • πŸ‡ΊπŸ‡ΈUnited States alan.wallace

    Putting a one second sleep in the purger in between calls appears to fix this:
    AzurePurger.php:95

     $firstChunk = true;
        foreach ($chunks as $chunk) {
          /**
           * Microsoft CDN Purge endpoint will throw item limit error if multiple requests are received too quickly exceeding the 100 item limit
           */
          if(!$firstChunk){
            sleep(1);
          }
          $this->purgeChunk($chunk);
    $firstChunk  = false;
        }
    
Production build 0.69.0 2024