admin/environment/php setting/memory limit
Z MoodleDocs
memory_limit should be at least 40M. Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory.