Problem solved.
Increased the memory limit to 128M since even 64M wasn’t working and website is super fast now