diff --git a/core/modules/taxonomy/taxonomy.install b/core/modules/taxonomy/taxonomy.install
index 75b1710366..5e2a546eb3 100644
--- a/core/modules/taxonomy/taxonomy.install
+++ b/core/modules/taxonomy/taxonomy.install
@@ -6,6 +6,7 @@
  */
 
 use Drupal\Core\Field\BaseFieldDefinition;
+use Drupal\Core\Site\Settings;
 
 /**
  * Convert the custom taxonomy term hierarchy storage to a default storage.
@@ -28,6 +29,7 @@ function taxonomy_update_8502(&$sandbox) {
   if (!isset($sandbox['current'])) {
     // Set batch ops sandbox.
     $sandbox['current'] = 0;
+    $sandbox['limit'] = Settings::get('entity_update_batch_size', 50);
     $sandbox['max'] = $database->select('taxonomy_term_hierarchy')
       ->countQuery()
       ->execute()
@@ -40,7 +42,7 @@ function taxonomy_update_8502(&$sandbox) {
   $hierarchy = $select
     ->fields('h', ['tid', 'parent'])
     ->fields('d', ['vid', 'langcode'])
-    ->range($sandbox['current'], $sandbox['current'] + 100)
+    ->range($sandbox['current'], $sandbox['limit'])
     ->execute()
     ->fetchAll();
 
diff --git a/core/modules/taxonomy/tests/src/Functional/Update/TaxonomyParentUpdateTest.php b/core/modules/taxonomy/tests/src/Functional/Update/TaxonomyParentUpdateTest.php
index 1580b8c5cf..c47e3e4869 100644
--- a/core/modules/taxonomy/tests/src/Functional/Update/TaxonomyParentUpdateTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Update/TaxonomyParentUpdateTest.php
@@ -47,6 +47,16 @@ public function setDatabaseDumpFiles() {
    * @see taxonomy_update_8503()
    */
   public function testTaxonomyUpdateParents() {
+    // Force the update hook to only run one term per batch.
+    drupal_rewrite_settings([
+      'settings' => [
+        'entity_update_batch_size' => (object) [
+          'value' => 1,
+          'required' => TRUE,
+        ],
+      ],
+    ]);
+
     // Run updates.
     $this->runUpdates();
 
