Every few hours, my Laravel website on AWS Elastic Beanstalk crashes and throws the following error:
[Sun May 19 13:06:13.436195 2019] [php7:error] [pid 3431] [client] PHP Fatal error: require(): Failed opening required '/var/app/current/vendor/composer/../symfony/polyfill-php70/bootstrap.php' (include_path='.:/usr/share/pear7:/usr/share/php') in /var/app/current/vendor/composer/autoload_real.php on line 66 [Sun May 19 13:06:31.485081 2019] [php7:warn] [pid 3459] [client] PHP Warning: require(/var/app/current/vendor/composer/../symfony/polyfill-php70/bootstrap.php): failed to open stream: No such file or directory in /var/app/current/vendor/composer/autoload_real.php on line 66
In-order to fix the error, I either go to
/var/app/current and use
composer.phar install to fix the packages installed.
Unfortunately, this doesn't cut it. Once I fix the issue, it breaks again a few hours later with the same errors. I tried to fix the packages associated with the deployed zip file. But that's to no avail either.
Is there something I'm misunderstanding about the AWS architecture? I'm new to AWS, any help?