Cannot install Drupal 8 via regular app installation

My YunoHost server

Hardware: VPS bought online
YunoHost version: 3.6.4.6 (stable)
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I was trying to install the Drupal application onto a subdomain, but after a long wait it failed.
Apparently due to out of memory issues… I only have 2 gigs on my tiny vps, yet I already had Drupal manually installed, so it sounds strange that I get this:

error: 'An unexpected error occurred: shell command return code: 1'
operation: app_install
related_to:
- - app
  - drupal
started_at: 2019-09-04 20:59:13.230646
success: false

2019-09-04 21:01:13,140: DEBUG - + workdir=/var/www/drupal
2019-09-04 21:01:13,141: DEBUG - + COMPOSER_HOME=/var/www/drupal/.composer
2019-09-04 21:01:13,141: DEBUG - + php7.2 /var/www/drupal/composer.phar install --no-dev -d /var/www/drupal --quiet --no-interaction
2019-09-04 21:02:12,065: WARNING - 
2019-09-04 21:02:12,196: DEBUG - 
2019-09-04 21:02:12,208: WARNING - mmap() failed: [12] Cannot allocate memory
2019-09-04 21:02:12,232: DEBUG - Fatal error: Out of memory (allocated 1043341312) (tried to allocate 4096 bytes) in phar:///var/www/drupal/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
2019-09-04 21:02:12,239: WARNING - 
2019-09-04 21:02:12,240: WARNING - mmap() failed: [12] Cannot allocate memory
2019-09-04 21:02:12,240: WARNING - PHP Fatal error:  Out of memory (allocated 1043341312) (tried to allocate 4096 bytes) in phar:///var/www/drupal/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
2019-09-04 21:02:13,079: DEBUG - + ynh_die 'Unable to update core dependencies with Composer.'
2019-09-04 21:02:13,084: WARNING - Unable to update core dependencies with Composer.

Full log here:
https://paste.yunohost.org/raw/yugojanopo

Hi @Toshiwoz, I would recommend to follow the “RAM usage” section and setup a swap in the https://yunohost.org/#/troubleshooting_guide guide which will help to avoid OOM issues AFAIK.

1 Like

Thanks for your answer, actually, as you mention that, I have 0 swap memory!!
It’s happening also when I try to install Drupal modules through composer, via SSH.

Pretty sure it will fix the problem,
thanks a lot.

1 Like

Shoot, it didn’t work, I’ve set 512 MB of swap memory, still same memory error.
Should allow more memory for PHP FPM?
image

2019-09-13 00:02:32,880: WARNING - The following exception is caused by a lack of memory or swap, or not having swap configured
2019-09-13 00:02:32,882: DEBUG - Warning: proc_open(): fork failed - Cannot allocate memory in phar:///var/www/drupal/composer.phar/vendor/symfony/console/Application.php on line 952
2019-09-13 00:02:32,883: WARNING - Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details
2019-09-13 00:02:32,884: WARNING - 
2019-09-13 00:02:32,884: WARNING - PHP Warning:  proc_open(): fork failed - Cannot allocate memory in phar:///var/www/drupal/composer.phar/vendor/symfony/console/Application.php on line 952
2019-09-13 00:02:32,885: WARNING - 
2019-09-13 00:02:32,886: WARNING -   [ErrorException]
2019-09-13 00:02:32,886: WARNING -   proc_open(): fork failed - Cannot allocate memory

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.