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?


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

| improve this answer | |
  • 2
    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 – tecjam Jan 25 '17 at 16:25
  • what kind of precautions we need to take care? – Nagaraju K Jan 27 '19 at 12:48
  • magento.stackexchange.com/questions/259389/… please advise – Nagaraju K Jan 27 '19 at 12:50
  • @Paul can u guide me how to fix this? ASAP – Nagaraju K Jan 28 '19 at 6:16

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.

| improve this answer | |
  • 1
    It is not a memory issue. The error said update/vendor/autoload.php does not exist – Paul Jul 29 '16 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 – Steve Johnson Jul 31 '16 at 14:20
  • I have set memory_limit = 2G but still failed – Paul Aug 3 '16 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. – Steve Johnson Aug 8 '16 at 15:51
  • I have double checked and the memory limit is set correctly. But the error still happens. – Paul Aug 9 '16 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.