When trying to deactivate the "Shopware Store" extension on the extensions page of the web admin UI at admin#/sw/extension/my-extensions/listing
, I get an error message that the memory size got exhausted:
Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 946176 bytes)
Apart from the question, why we need to allocate any significant amount of memory only to deactivate an extension, the numbers do not add up. How can the allocation of 946 KB lead to an exhaustion of 134.2 MB?
This error message occurs in Shopware 6.4.16.1, both when trying to deactivate the extension manually, but also when trying to start the web updater to update Shopware to the latest version. Maybe this memory allocation bug got fixed in the latest update, but it prevents us from getting the update, at least in the admin UI. There is currently no other active extension apart from "Shopware Store".
A possible workaround could be using the command line (bin/console
) for deactivating the extension and for updating the software, possibly adding an option to raise the memory limit (like memory_limit=156M
). We could also download the latest Shopware core or check it out from git. We could also raise the memory limit in php.ini
before using the web updater.
Is there any solution to fix this problem by only using the admin UI without using ssh
or sftp
?
Just increase your memory limit to the recommended 512M. Depending on the complexity of installed extensions, you might even need more memory allowance.
But if you set the memory limit very high (like 2G) there sure would be a problem such as a endless loop / recursion which needs to be debugged.
Anyways, with such a low memory limit, it's most probably enough to increase the memory limit and not a bug.
This is not possible without SSH or SFTP. You have to find out where the memory limit is configured on your server. If you use a managed hoster, often the is some special admin panel where you can do such settings - or just ask their support.
How can the allocation of 946 KB lead to an exhaustion of 134.2 MB?
This just means, it tried to allocate an additional of 946 KB and then the limit was reached. So around 133 MB already were allocated before. It's perfectly normal that also uninstallation of an extension needs some memory.