I\'ve had some issues lately with PHP memory limits lately:
Out of memory (allocated 22544384) (tried to allocate 232 bytes)
Check the documentation of the function memory_get_usage() to view the memory usage in run time.