Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have latest dev of background process and I enabled background batch.
It works perfectly for checking module updates, but it has problem when rebuilding xmlsitemap (latest dev version).
It stops at 33% reloading for ever the page and showing
Completed 2 of 9
Now processing node 654 (560 of 578)
Comments
Comment #1
gielfeldt CreditAttribution: gielfeldt commentedHi dropbydrop
Sorry, I didn't see this post until now. I'll try to see what I can figure out about this.
Comment #2
gielfeldt CreditAttribution: gielfeldt commentedI can recreate this error. It seems that xmlsitemap memory exhausts, and when this happens, the background batch doesn't restart automatically. The regular Drupal batch works, because when the client polls for status it actually also runs the batch job operation, thereby implying resume if it has crashed.
I'll see if I can mimic this behavior. Until then you should be able resume the batch job just by reloading the progress page.
Comment #3
gielfeldt CreditAttribution: gielfeldt commentedHi dropbydrop
I think I've improved this part (along with a dusin others). Two notable things are memory exhaust prevention for batch jobs (or at least an attempt), and automatic restart of the background batch job when viewing the progress indicator page. I've nearly just committed to dev, so tarball will probably not be ready before midnight UTC (i think that's when drupal.org builds them).
If you try it out, you also need to upgrade Ultimate Cron to the latest dev, in case you are using this, as I've had to implement a temporary reverse dependency here. You should probably also update the Progress module to the latest dev.
Let me know how it works for you.
Comment #4
gielfeldt CreditAttribution: gielfeldt commentedComment #5
gielfeldt CreditAttribution: gielfeldt commentedMemory exhausted batch-jobs should restart by them selves now.