In one of my custom script a memory exhaust issue showing.so i did set memory_limit to -1 now it is working fine.But is this the good approach to do this or need to increase the size of memory_limit variable on server?

有帮助吗?

解决方案

As per memory management on server, we should increase the size of a memory_limit variable. because putting memory_limit = -1 in particular page is consuming to much cpu process as well it also impacts on website performance when user ratio is increased on site.

So my point of view it needs to change server variable.

许可以下: CC-BY-SA归因
scroll top