v2-hub
v2-hub copied to clipboard
Excessive memory when updating
Describe the bug NB: might be the same as #1783
Updating from v2.11.9 to v2.11.10 has failed via the CP on multiple sites. Seems to be a memory issue.
Was able to workaround by setting memory_limit = 2048M
in php.ini
(previously set at 512M
). This seems extraordinarily high based on reading other {s} issues and forum posts.
Wondering if setting memory_limit
to -1
would be reasonable? (That value is taken from the Composer help doc here linked to in the error message.)
To Reproduce Steps to reproduce the behaviour:
- Update the site from Control Panel
- Files download and upzip
- Installation fails with the following message in CP
Couldn't install dependencies.
The command "php composer.phar update rap2hpoutre/laravel-log-viewer --prefer-dist --no-dev --optimize-autoloader" failed.
Exit Code: 255(Unknown error)
Output: ================
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 32 bytes) in phar:///home/wesort/webapps/ccdev/local/temp/update-unzipped/statamic/statamic/composer.phar/src/Composer/DependencyResolver/RuleWatchNode.php on line 40
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
Error Output: ================
Loading composer repositories with package information
Updating dependencies
Expected behavior
- CMS to update and to hear that arcade game jingle of joy.
- Not need a (seemingly) high memory limit.
Screenshots
Environment details (please complete the following information):
- Statamic Version v2.11.9
- Fresh Install or Upgrade: upgrading
- OS: Linux
- Browser: Chrome(OS)
- Web Server: Apache/nginx (Webfaction)
- PHP Version: 7.2
- Addons installed: Logbook
Wondering if anyone else has experienced this issue or there's something in my environment?
How many addons do you have installed?
Just two:
- Logbook
- SVG Output (and this one is outmoded and unnecessary now anyway not that {s} has native support for svg)
I have this issues with recent updates, the update fails even with a memory limit of 1.5GB. Seeing this on Linux and MacOS.
Even with projects with only 1 or 2 addons which have dependencies.
COMPOSER_MEMORY_LIMIT=-1 php please update
Works but nomnomnomnom's your memory
I have this issues with recent updates, the update fails even with a memory limit of 1.5GB. Seeing this on Linux and MacOS.
Even with projects with only 1 or 2 addons which have dependencies.
COMPOSER_MEMORY_LIMIT=-1 php please update
Works but nomnomnomnom's your memory
Thanks for much for this!
Same issue here. Only have to addons with dependencies.
Same here. The -1 memory limit workaround works.
I have this issues with recent updates, the update fails even with a memory limit of 1.5GB. Seeing this on Linux and MacOS.
Even with projects with only 1 or 2 addons which have dependencies.
COMPOSER_MEMORY_LIMIT=-1 php please update
Works but nomnomnomnom's your memory
This solution works for me.