šŸ¤– Auto update doesn't seem to work anymore?

image

Since the last couple of released updates we been forced to update manually everytime as the auto update feature doesnā€™t seem to work properly anymore (?), and this time is no exception.
This time with this error:
image

I suppose we should go about and just update manually again @hillel ?

Thanks in advance for the help.
Kind regards
PowerQuest

Hi,

I believe weā€™ve made some recent changes related to this error, @david can you please advise?

So manually update then? :thinking:

Or do we need to do any fix first?

Kind regards
PowerQuest

This issue has been discussed a few times.

Itā€™s more than likely an issue with your PHP memory_limit being set too low. Increase it to over 200M and restart php-fpm. Also use Php 8.0 or 7.4, not 8.1.

Also ensure all your permissions are correct and try to clear the bootstrap/cache folder before updating.

See solutions mentioned here:

Also discussed here: https://github.com/invoiceninja/invoiceninja/issues/7361

2 Likes

Raising the memory from 128M to 256M does the trick. :white_check_mark:

Thank you for the suggestion @kylegp :+1:

Kind regards
PowerQuest

1 Like

No worries. I believe @david added better error handling for an out of memory situations now in the latest versions?

1 Like

@kylegp

Currently we are still relying on the extra memory to complete the update, when i get some free cycles iā€™ll see if there is a way to get the update done with 128mb of memory.

1 Like

Sounds awesome @david !
Thank you. :facepunch:

Please help. I tried updating my self hosted v5 and I was having this same problem. I increased the php memory to 256M and restarted php but now the site is completely down (just a blank page in the browser). Iā€™m running php7.4
In the desktop app I get an error saying that cron isnā€™t running. I checked and it appears to be running but when I run ā€œphp artisan schedule:runā€ and I get this error:

PHP Fatal error: Uncaught Error: Class ā€˜ComposerAutoloaderInit21dc8d6292ddc29c74fa79a2581d7083ā€™ not found in /var/www/ninja/vendor/autoload.php:12
Stack trace:
#0 /var/www/ninja/artisan(18): require()
#1 {main}
thrown in /var/www/ninja/vendor/autoload.php on line 12

Thank you for any assistance. Iā€™ll open a ticket elsewhere or provide more information if someone can point me in the right direction.

Iā€™ve solved this. The vendor/autoload.php was looking for ā€˜ComposerAutoloaderInit21dc8d6292ddc29c74fa79a2581d7083ā€™ in the file vendor/composer/autoload_real.php
However vendor/composer/autoload_real.php contained a different ComposerAutoloaderInit number.
Once I corrected the ComposerAutoloaderInit number in vendor/autoload.php and re-ran php artisan schedule:run everything was back to normal.
And with the added memory in php the upgrade worked to. :slight_smile:

After setting memory_limit to 256M auto update worked. However, I had to run it twice for some reason. It said update successful and the version still remained v5.3.95 and it still recommended update to v5.3.96 and after second auto update the version ended up being v5.3.99.