问题原文
原帖链接 · Praesagus · CC BY-SA 3.0
I have one account on my vps that is hogging more than it's fair share of memory. How can I limit that account's memory usage?
- Setting
memory_limitin the php.ini? It appears as if this sets the memory per script – so that would change based on the number of pages or requests instead of the total for the account? - Setting the
RLimitMEMin Apache sets a new memory limit for Apache processes. (in whm (Home >> Service Configuration >> Apache Configuration >> Memory Usage Restrictions) That would also change the total memory based on requests instead of the total for the account?
已采纳解答
原帖链接 · Chris Rutherfurd · CC BY-SA 3.0
The only memory limitations currently supported are the ones that you have asked about. There is no way currently in cPanel to apply a memory limit on an account basis, only on a per script or per process basis. The issue you would encounter is how to apply a memory limit on a per account basis as each account does not spawn its own Apache process and if it did would be a waste of resources as the account would not always need that process to be active. If you are seeing performance issues try applying a per-scriipt php.ini memory limitation.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
