resource control?

73 views
Skip to first unread message

Tomasz Chmielewski

unread,
Nov 28, 2017, 1:13:39 AM11/28/17
to beanstalk-talk
Are there any settings which would allow to control how much resources beanstalkd uses?

I had a few cases lately where a misbehaving server was adding new jobs to the queue, but they were never removed. In the end, it resulted in out-of-memory killing beanstalkd.


Is there any better control over this?

I.e. allow beanstalkd to use maximum of X GB of memory - when that's reached, return an error for any write attempts.


Tomasz Chmielewski
https://lxadm.com

Keith Rarick

unread,
Nov 28, 2017, 1:25:20 AM11/28/17
to beansta...@googlegroups.com
On Mon, Nov 27, 2017 at 10:13 PM 'Tomasz Chmielewski' via beanstalk-talk <beansta...@googlegroups.com> wrote:
Are there any settings which would allow to control how much resources beanstalkd uses?
...

I.e. allow beanstalkd to use maximum of X GB of memory - when that's reached, return an error for any write attempts.



Yes, you can do this by running the beanstalkd process with Unix resource limits in place, such as with ulimit -v or ulimit -m. This will cause allocations to fail when the process is at its limit, and beanstalkd will handle this situation by returning an error message to the client attempting to submit a job.


Reply all
Reply to author
Forward
0 new messages