Describe the bug
Deploying a site using drush deploy is showing me out-of-memory errors even though I'm running it with the following command line:
php -d memory_limit=-1 vendor/bin/drush deploy.
To Reproduce
Execute php -d memory_limit=-1 vendor/bin/drush deploy.
Expected behavior
Drush would not run out of memory, and finish deploying the site.
Actual behavior
Drush ran out of memory at PHP's configured memory limit.
Workaround
Instead of running drush deploy, run the following set of commands in sequence:
php -d memory_limit=-1 vendor/bin/drush updatedb --no-cache-clear
php -d memory_limit=-1 vendor/bin/drush cache:rebuild
php -d memory_limit=-1 vendor/bin/drush config:import
php -d memory_limit=-1 vendor/bin/drush cache:rebuild
php -d memory_limit=-1 vendor/bin/drush deploy:hook
However, this defeats the purpose of having the deploy command. Also it transfers the burden of what exactly the deploy command does back to my CI deploy script.
System Configuration
| Q |
A |
| Drush version? |
10.3.6 |
| Drupal version? |
9.2.7 |
| PHP version |
7.4.25 |
| OS? |
Linux |
Additional information
I believe the problem here is that even though the drush deploy command is indeed running in an unlimited memory environment, drush is starting new scripts that do not inherit the memory_limit setting from the deploy command.
Describe the bug
Deploying a site using
drush deployis showing me out-of-memory errors even though I'm running it with the following command line:php -d memory_limit=-1 vendor/bin/drush deploy.To Reproduce
Execute
php -d memory_limit=-1 vendor/bin/drush deploy.Expected behavior
Drush would not run out of memory, and finish deploying the site.
Actual behavior
Drush ran out of memory at PHP's configured memory limit.
Workaround
Instead of running
drush deploy, run the following set of commands in sequence:However, this defeats the purpose of having the deploy command. Also it transfers the burden of what exactly the deploy command does back to my CI deploy script.
System Configuration
Additional information
I believe the problem here is that even though the drush deploy command is indeed running in an unlimited memory environment, drush is starting new scripts that do not inherit the memory_limit setting from the deploy command.