0

I am getting these errors repeatedly in my logs

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes)

I don't get why it would die with memory size being much bigger then the bytes attempted to allocate!!

Kal
  • 908
  • 14
  • 27

1 Answers1

1

The error message tells you that a limit of 134217728 bytes (128 MB) was defined. This has already been used by your script, but it requested more. Allocating the next bytes (in your example: 20480) failed, that's why the script died.


To resolve this, you could either check why your script needs that memory (reducing the memory footprint can always be a good idea), or otherwise set a higher memory limit

Nico Haase
  • 9,476
  • 35
  • 35
  • 57
  • Don't think answers the question. I did increase the limit yet I got the same issue. `PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes)` – Kal Nov 02 '21 at 14:47
  • Yeah, now you are using a higher memory limit, but still exceed it – Nico Haase Nov 02 '21 at 14:48