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.
ini_get('max_execution_time') returns 0 on my development system. (Don't ask me why.)
The issue is that the logic of _backup_migrate_check_timeout() is such, that no backups run if ini_get('max_execution_time') < variable_get('backup_migrate_timeout_buffer', 5).
So I made the code a little more robust.
I included a patch without whitespace changes, but that messes the indentation up a little. So I included the same patch with whitespace changes as well, for applying. (Is correct, but more confusing to read.)
Comment | File | Size | Author |
---|---|---|---|
#2 | backup_migrate.executiontime.patch | 5.7 KB | roderik |
#1 | backup_migrate.executiontime.patch | 5.7 KB | roderik |
backup_migrate.executiontime.patch | 5.7 KB | roderik | |
backup_migrate.executiontime_nows.patch | 1.24 KB | roderik | |
Comments
Comment #1
roderikMoved one line around.
Comment #2
roderikCorrectly uploading stuff is an art form :p
Comment #3
JeremyFrench CreditAttribution: JeremyFrench commentedThat patch seems to contain a lot of fluff.
I just put
at the top of _backup_migrate_check_timeout.
But this bug cost me an hour or so so would be nice to get fixed.
Comment #4
ronan CreditAttribution: ronan commentedAgreed. I like the simple solution. I think any non-zero value less than 5 seconds is unlikely enough that it doesn't really require a special case (and is probably too short for a db backup anyway).