[SOLVED] Occ command; PHP Fatal error, Allowed memory size of XXX bytes exhausted

Could you please shortly explain why? It also works for me, but it still cannot work automatically, which is my purpose.

Here it runs ok like 10 minuts, and then the same

I experienced this same issue. What “fixed” it for me was defining memory_limit explicitly on the command line.

sudo -u apache php --define memory_limt=512M ./occ

I find this odd, considering I have memory_limit=512M in my /etc/php.ini, and running php -i | grep memory_limit shows the value set to 512M.