WebFaction
Community site: login faq

I'm running a work queue (beanstalkd) which tends to increase its memory usage over time. The author of the process recommends using "ulimit -v" (https://github.com/kr/beanstalkd/issues/56) but I don't know how to use this option in Webfaction. Can I limit the memory usage of a process and would it help in my case ("-v" option seems to be limiting the virtual memory).

Thanks,

AmaƧ

asked 08 Jun '11, 09:25

amacinho
1057
accept rate: 0%


Limiting the memory usage in such a way will most likely cause your your application to crash, but yes, it would limit the memory usage. Keep in mind that we are monitoring the RSS (Resident Set Size) memory on our side, rather than the Virtual Memory, so the proper switch would be '-m' rather than '-v'.

Using this kind of limit is as simple as running 'ulimit -m <memory in="" kilobytes="">' in the same terminal session where you start your application.

You may want to check the 'ulimit' man page here.

permanent link

answered 08 Jun '11, 09:37

tie
1.4k13
accept rate: 44%

Thank you very much. That will solve my problem. I'm assuming that in my case crashing won't be an issue because the application should be acting properly when it can't allocate new memory.

(08 Jun '11, 10:04) amacinho
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×87
×2
×2

question asked: 08 Jun '11, 09:25

question was seen: 6,092 times

last updated: 08 Jun '11, 10:04

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM