Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.Problem/Motivation
The "zip" step in BatchOperations::copyEntityFilesAndZip() which appends new files to an existing zip can cause several problems and needs to be reworked.
- On systems that are handling large files, an individual file can take a substantial amount of time to be added to a zip file, introducing max_execution_time timeouts.
- The zipping of a file is an order of magnitude slower than the copy operation, causing each operation to be quite slow compared to how quickly they run if the "zip" step is skipped.
Proposed resolution
Reduce the zipping behavior to an optional feature or even consider removing it completely because command line or other non-PHP methods is significantly better and more reliable. The biggest benefit of this module is gathering all of the necessary files for a deployment in one place, and many developer workflows wouldn't benefit from the additional zip stage, either.
Remaining tasks
Root cause analysis.Make zipping optional.- Provide guidance on rsync or scp commands if a batch has been completed; either in docs or on-screen (or both)
Comments
Comment #2
wwedding commentedProblem/Motivation
The "zip" step in BatchOperations::copyEntityFilesAndZip() which appends new files to an existing zip can cause several problems and needs to be reworked.
Proposed resolution
Make zip take place in a part of the batch where a failure will not potentially ruin the whole process, while also offering guidance on what to do with configuration screen to attempt to work around problems.
Remaining tasks
Root cause analysis.Make zipping optional.Comment #3
wwedding commentedComment #4
wwedding commentedComment #5
wwedding commentedComment #6
wwedding commentedComment #7
wwedding commentedComment #8
wwedding commentedAfter having used the zip feature for several more deployments, I think it's not actually that bad. For the most part, it has worked out really well even with relatively short PHP timeouts specified; I think it still deserves a spot as a core (with the ability to be made optional) feature and not removed from the project page or anything else extreme I was considering when I first had this issue.
Improved documentation and troubleshooting are still certainly necessary, as well as allowing the zip step to be skipped.
Comment #9
wwedding commentedDocumentation concerns are covered in #3050530: Write documentation that provides guidance about what to do with copied files