9

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?

18

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

-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.

  • 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.