On Tue, 2009-01-13 at 09:34 -0500, Zeek Anow wrote:
We are running Solaris 9, syslog-ng 2.0.5,
We are getting: Error opening file for writing; filename='/logs/combo/combo.log.01', error='Too many open files (24)'
I went into the startup script, /etc/init.d/syslog-ng and tried to up the limit by putting this in the startup section:
ulimit -n 4096.
When I stop and start syslog-ng and look at the ulimit settings, it still shows 256. core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited open files (-n) 256 pipe size (512 bytes, -p) 10 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 29995 virtual memory (kbytes, -v) unlimited
Any ideas on how to set this?
Thanks,
ulimits are inherited through the process tree, e.g. if you change ulimit in your shell, then the executed processes will have that ulimit. However if you change it in the syslog-ng init script, that change won't be propagated back to your login shell. Try reading the ulimit values right from the init script to see if they are in effect. Please note that syslog-ng 3.0 already increases ulimit for itself, to 4096 fds by default, but you can change those using command line options. (also, it is able to restart itself upon failure and send out an email in this case). -- Bazsi