Setting memory consumption limits with Upstart

前端 未结 2 589
栀梦
栀梦 2021-02-01 06:31

I\'ve recently become quite fond of Upstart. Previously I\'ve been using God, Monit and Bluepill but I don\'t really like these solutions so I\'m giving Upstart a try.

I

2条回答
  •  北恋
    北恋 (楼主)
    2021-02-01 07:10

    Appending this to the end of myapp-web-*.conf will cause any allocation calls trying to allocate more than 150mb of memory to return ENOMEM:

    limit rss 157286400 157286400
    

    The process might crash at this point, or it might not. That's up to the process!

    Here's a test for this in the Upstart Source.

提交回复
热议问题