-1

On a non production system I export data from a Magento shop using PHP script on CLI. Even if I use this settings

php -i | grep memory_limit
memory_limit => -1 => -1

or (for testing, if "-1" is a problem)

php -i | grep memory_limit
memory_limit => 9000M => 9000M

in my /etc/php/7.0/cli/php.ini, I get the following error:

Fatal error: Allowed memory size of 6290000000 bytes exhausted (tried to allocate 232422 bytes)

Memory of the system using command "top":

KiB Mem : 20561176 total,  8667804 free,  7096968 used,  4796404 buff/cache
KiB Swap:  4190204 total,  4067004 free,   123200 used. 13050308 avail Mem

How can I increase the memory limit to really unlimited?

Exists other settings I don't know?

waltavista
  • 147
  • 1
  • 7
  • How do you export the data? To a file? What kind of format is used? – ino Dec 08 '17 at 07:41
  • https://stackoverflow.com/questions/11885191/how-to-increase-memory-limit-for-php-over-2gb – Alive to die - Anant Dec 08 '17 at 07:41
  • 5
    If your script consume so much esources then further increasing memory limit is a bad idea. Try to figure out why does it happen in the first place. – Bartosz Herba Dec 08 '17 at 07:43
  • I export to a csv file. It size should be about 200 MB. I consumes so much memory because I have to to over all products in the Magento database with more than 300.000 items and build a huge collections. – waltavista Dec 08 '17 at 07:53

1 Answers1

0

There was a hard coded

ini_set('memory_limit', '6000M');

in the Magento code. Sorry for my question.

waltavista
  • 147
  • 1
  • 7