14

I'm getting an error on running update/cron.php

I setup the cronjob according to the documentation. But it gives the following error:

PHP Warning: require_once(update/vendor/autoload.php): failed to open stream: No such file or directory in update/app/bootstrap.php on line 13

PHP Fatal error: require_once(): Failed opening required 'update/vendor/autoload.php' (include_path='.:') in update/app/bootstrap.php on line 13

I found that the path update/vendor/autoload.php is wrong. The autoload.php should be at /vendor instead. Is it a bug?

2 Answers 2

29

I finally figure out the issue. I have to run composer install at <magento_dir>/update/.

4
  • 3
    That is correct. But surely this should be done automatically when doing a composer install for magento2? Is this a bug? Still happens in 2.1.3 Commented Jan 25, 2017 at 16:25
  • what kind of precautions we need to take care? Commented Jan 27, 2019 at 12:48
  • magento.stackexchange.com/questions/259389/… please advise Commented Jan 27, 2019 at 12:50
  • @Paul can u guide me how to fix this? ASAP Commented Jan 28, 2019 at 6:16
-1

According to an internal Magento issue, that error indicates cron is running out of memory. Try increasing your PHP memory_limit to at least 1G; in fact, I believe we're going to start recommending 2G but that's not confirmed.

After you do that, restart your web server.

And by the way, sometimes you have two php.ini files: one for the PHP CLI and one for the web server plug-in. Change them both. See this to determine if you have one or two.

5
  • 1
    It is not a memory issue. The error said update/vendor/autoload.php does not exist Commented Jul 29, 2016 at 4:04
  • This is the error I see in the internal issue. The cause is attributed to running out of memory: Warning: require_once(/magento2/update/vendor/autoload.php): failed to open stream: No such file or directory in /magento2/update/app/bootstrap.php on line 13 Commented Jul 31, 2016 at 14:20
  • I have set memory_limit = 2G but still failed Commented Aug 3, 2016 at 11:15
  • If you have two php.ini files, you must set memory_limit in both. If you rule that out, and you know autoload.php exists, then I don't know, sorry. Commented Aug 8, 2016 at 15:51
  • I have double checked and the memory limit is set correctly. But the error still happens. Commented Aug 9, 2016 at 9:16

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.