I'm struggling to work out how to set the open file limit on rsyslog on Ubuntu 14.04. It uses Upstart, which ignores
limits.conf, but I'd expect to be able to put
limit nofile 16384 16384
/etc/init/rsyslog.conf as suggested by this rsyslog email list post. But having done that and run
restart rsyslog, when I check
/proc/$RYSLOGPID/limits I can see that the "Max open files" is still 1024 soft, 4096 hard.
My first guess was that the problem is related to the fact that the Upstart script uses
script tags rather than a simple
exec to launch
rsyslog, which does some kind of fancy forking stuff. However, I tried putting a
ulimit -n in the
script section, but to no avail, and I also tried getting rid of the
script stuff (which exists purely to make sure that the stuff from
/etc/default/rsyslog is in the environment -- this file was empty apart from setting
RSYSLOGD_OPTIONS to an empty string, so it was a no-op), also to no avail.
Does anyone have any ideas?
Full upstart script follows:
# rsyslog - system logging daemon # # rsyslog is an enhanced multi-threaded replacement for the traditional # syslog daemon, logging messages from applications description "system logging daemon" start on filesystem stop on runlevel  expect fork respawn limit nofile 16384 16384 pre-start script /lib/init/apparmor-profile-load usr.sbin.rsyslogd end script script . /etc/default/rsyslog exec rsyslogd $RSYSLOGD_OPTIONS end script