Increasing max-open files for beanstalkd

Increasing max-open files for beanstalkd
Table of Contents

Quick tip: If you are running out of file descriptors in your Beanstalkd process, use
/etc/default/beanstalkd to set the ulimit before the init script starts the process.

e.g.

# file: /etc/default/beanstalkd
BEANSTALKD_LISTEN_ADDR=127.0.0.1
BEANSTALKD_LISTEN_PORT=11300
START=yes
BEANSTALKD_EXTRA="-b /var/lib/beanstalkd -f 1"

# Should match your /etc/security/limits.conf settings
ulimit -n 100000

Lots of resources online tell you to update your /etc/security/limits.conf and
/etc/pam.d/common-session* settings to increase your maximum number of available file descriptors.
However, the default beanstalkd installation on Ubuntu 12.04+ uses an init script that starts the
daemon process using start-stop-daemon which does not use your system settings when setting the
processes ulimits. Just add this line to your defaults and you're good to go!

Build with confidence. Release with clarity.

Rollbar helps you track what breaks, understand why, and improve what comes next.

5K free events per month, forever
14-day full feature trial
Easy and quick installation
Get started in minutes

Plans starting at $0. Take off with our 14-day full feature Free Trial.