开发者

What Are The Potential Problems With Setting Higher Memory Limit?

开发者 https://www.devze.com 2023-01-31 06:07 出处:网络
What are the potential problems that开发者_如何转开发 could be encountered when the memory limit in php.ini is set to say 100MB?I can see only the obvious one: That a greedy or broken script can hog a

What are the potential problems that开发者_如何转开发 could be encountered when the memory limit in php.ini is set to say 100MB?


I can see only the obvious one: That a greedy or broken script can hog a lot of your resources. If such a script gets requested by multiple clients simultaneously, it could become a serious resource problem for your server.

Depending on your use case, maybe it's wise to increase the memory limit on a per-script basis instead.


On Linux, if the server runs out of memory, it starts swapping (using slow hard disk for virtual memory).

If it runs out of swap, it starts killing processes at semi-random (the algorithms are complex and usually hard to predict).

0

精彩评论

暂无评论...
验证码 换一张
取 消