如何限制 Phusion 乘客内存使用量? [英] How to limit Phusion Passenger memory usage?

查看:66
本文介绍了如何限制 Phusion 乘客内存使用量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法限制 Phusion Passenger 在为您的应用提供服务时使用的内存量?

Is there a way to limit the amount of memory Phusion Passenger uses when serving up your app?

在我获得大量流量后,我的主机过来并终止了该进程,因此我最终提供了空白页面.有什么我可以说的嘿,不要使用超过 100Mb 的空间,并且无论站点多么过载,都只会产生 3 个进程"

My host comes by and kills the process after I get a bunch of traffic and so I end up serving up blank pages. Is there anything I can do to say "hey don't use any more than 100Mb and only spawn 3 processes no matter how overloaded the site is"

推荐答案

没有办法明确限制内存使用(比如 use <= 100MiB).

There is no way to limit the memory usage explicitly (say use <= 100MiB).

但是您可以通过设置来限制进程数乘客最大泳池尺寸.设置它,然后查看内存使用情况(这取决于您正在运行的应用程序).

But what you can do is limit the number of processes by setting PassengerMaxPoolSize. Set that and then see how is the memory usage (that depends on the apps you are running).

此外,使用 Ruby Enterprise Edition 可能会有所帮助.

Also, using Ruby Enterprise Edition may help.

这篇关于如何限制 Phusion 乘客内存使用量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆