0
votes

I am trying to setup elastic beanstalk. After selecting PHP 5.6 my application is not deploying and showing the below errors and also my health is showing degraded -

    i-08a5a7a9b027a7de9 Severe  16 hours    4   --  --  --  --  --  --  --  --  --  --  0.00    0.00    0.1 0.0 99.9    0.0

Application update failed at 2019-07-25T13:30:00Z with exit status 1 and error: Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_composer_install.sh failed.

  • . /opt/elasticbeanstalk/support/envvars-wrapper.sh ++ set +x ++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir
  • EB_APP_STAGING_DIR=/var/app/ondeck
  • cd /var/app/ondeck
  • '[' -f composer.json ']'
  • export COMPOSER_HOME=/root
  • COMPOSER_HOME=/root
  • '[' -d vendor ']' ++ /opt/elasticbeanstalk/bin/get-config optionsettings -n aws:elasticbeanstalk:container:php:phpini -o composer_options
  • PHP_COMPOSER_OPTIONS=
  • echo 'Found composer.json file. Attempting to install vendors.' Found composer.json file. Attempting to install vendors.
  • composer.phar install --no-ansi --no-interaction Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Updating dependencies (including require-dev) PHP Fatal error: Out of memory (allocated 755761152) (tried to allocate 134217728 bytes) in phar:///opt/elasticbeanstalk/support/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220

Fatal error: Out of memory (allocated 755761152) (tried to allocate 134217728 bytes) in phar:///opt/elasticbeanstalk/support/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220. Incorrect application version "Sample Application-3" (deployment 4). Expected version "Sample Application" (deployment 1).

I have already tried to setup first a sample application and then tried to upload my app but didn't work

1
Fatal error: Out of memory (allocated 755761152) (tried to allocate 134217728 bytes) - did you try to up the memory_limit in php.ini file to accommodate the high memory usage ? - rkeet

1 Answers

-1
votes

Try clearing composer cache on your instances, or rebuild environment. See if it helps