Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
system.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2021 at 18:11 UTC
Updated:
26 Sep 2023 at 13:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
paulmckibbenComment #3
paulmckibben(fixed typo in description)
Comment #4
cilefen commentedComment #5
longwaveThanks for working on this.
I think this should use
entity_update_batch_size:Not sure this is necessary, there must be at least one config entity?
Comment #6
paulmckibben@longwave Thanks for the review! I didn't know about that setting - great idea. I've updated my patch addressing both of your comments.
Comment #7
ranjith_kumar_k_u commentedFixed CS error.
Comment #8
lendudeLooks good, ran it locally and get a nice progress bar and everything.
Took a look at maybe simplifying the logic a little bit to make it a little easier to read, but this works so ¯\_(ツ)_/¯
Comment #9
longwaveOver in #3254169-34: Update aborted by system_post_update_sort_all_config. Drush command terminated abnormally. Output is empty. @bmango reports:
Comment #10
longwavePosting just to add I don't think this should stop this being committed, as batching the update can only make it better - even if it hasn't solved it for everyone.
Comment #14
catchWould normally use array_chunk() for an update function like this, but the for loop is fine.
If this was all config entities we could have used config entity updater, but it's not, so the manual batch is OK. And even though they're not entities, using the entity_update_batch size seems correct here.
Committed/pushed to 10.0.x and cherry-picked to 9.4.x and 9.3.x, thanks!
Comment #15
vlyalko commentedHave applied the patch and still getting out of memory.
Comment #16
cilefen commentedAre you certain the system_post_update_sort_all_config function is executing when that occurs?
Comment #17
vlyalko commentedYes, I am 100% sure
Comment #18
vlyalko commentedIt worked on sanitized database, but not on prod. Set php and drush memory limit to 2G. Still not working. Tried even set to 3G, but drush limit not taking 3G. We are using mariadb 10.5.12

Comment #19
vlyalko commentedComment #20
cilefen commentedWhat is entity_update_batch_size set to on that instance?
Comment #21
vlyalko commentedin settings.php: $settings['entity_update_batch_size'] = 50;
Comment #22
vlyalko commentedComment #23
cilefen commentedLet’s leave this one fixed and work the other issue for whatever cases don’t seem to be fixed by batching.
Comment #24
abhishek.kumar commentedI did upgrade my Drupal from 8.9.x to 9.3.2 and I am still facing the issue to perform database updates. In 9.3.2 no need to apply the patch however going through this thread I have reduced $iteration_size = 1; and still memory utilization going more than 100GB and after some time it throws "The process has been signaled with signal "9". "
Please find the attached screen for the same. Does anyone have any solution to this?
Comment #25
cilefen commentedThis issue is resolved. Please see #3254169: Update aborted by system_post_update_sort_all_config. Drush command terminated abnormally. Output is empty.
Comment #27
hasinanjaratin commentedRun first,
drush cimbefore updatedb