I'm getting this error
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194304 bytes)
How come he tried to allocate 4194304
(which is smaller than the limit he specifies 134217728
) and is exhausted?
I'm getting this error
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194304 bytes)
How come he tried to allocate 4194304
(which is smaller than the limit he specifies 134217728
) and is exhausted?
PHP tried to allocate an extra of 4194304
bytes (after your code reached the upper limit of 134217728) , but your code exhausted that too.)
134217728
was the limit which your code exceeded.
When working with resource heavy operations there are a couple of things to consider and multiple steps to prevent memory exhaustion.
You are exhausting your memory most likely due to not flushing or destroying old data from the current execution. That is why PHP peaks it's allowed allocation of system memory.