Self updater not working memory exhausted error

I’ve been trying to update to v5.7.3 using the self updater. Currently on v5.6.19-W123

It’s failing with “Server error”
storage/laravel.log showed this:

[2023-08-24 03:56:42] production.ERROR: Allowed memory size of 629145600 bytes exhausted (tried to allocate 36864 bytes) {"userId":1,"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Allowed memory size of 629145600 bytes exhausted (tried to allocate 36864 bytes) at /home/invoiceapp/invoiceninja/app/Http/Controllers/SelfUpdateController.php:76)
[stacktrace]
#0 {main}
"} 
[2023-08-24 03:58:34] production.ERROR: Allowed memory size of 734003200 bytes exhausted (tried to allocate 36864 bytes) {"userId":1,"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Allowed memory size of 734003200 bytes exhausted (tried to allocate 36864 bytes) at /home/invoiceapp/invoiceninja/app/Http/Controllers/SelfUpdateController.php:76)
[stacktrace]
#0 {main}
"} 

I increased the PHP memory from 530M to 630M then to 730M and no difference
Then I increased the PHP memory to 2000M which is much more than needed and got this error on the front-end (nothing in storage/laravel.log for this):

FormatException: Unexpected end of input (at character 1)

^

It may help to increase the server PHP memory limit

The self updater used to work fine on this environment even with only 256M of memory, but now it’s failing all self updates.

Hi,

As a workaround you can manually copy over the latest release zip.

I have logo files that were uploaded to invoiceninja which I don’t want to disappear
Hence I tried using the self updater as I always did
I’ll do the manual update

A manual update shouldn’t affect any uploaded files

I did the manual update to v5.7.4, but now when I try to update to v5.7.5 using self-updater it’s still the same issue. It doesn’t look like v5.7.5 fixes this issue.

FormatException: Unexpected end of input (at character 1)

^

It may help to increase the server PHP memory limit

I want to use the manual updater instead of workarounds of copying over the zip.

@david do you have any thoughts?

This has been an ongoing issue for some time. I reported this about 6 months ago on Discord.

I believe @david was able to make some progress with the issue for the v5.6.x releases however upgrading from v5.6 to v5.7 is a larger update.

Please let us know if you continue to see the issue when doing updates once you’ve upgraded to the v5.7 release.