Date: Sat, 16 May 2009 12:27:22 -0500 From: Kirk Strauser <kirk@strauser.com> To: FreeBSD Questions ML <freebsd-questions@freebsd.org> Subject: Limiting resources in cron jobs Message-ID: <43B3CD0F-BDCB-4DEC-9E17-E0D7A8287FDE@strauser.com>
next in thread | raw e-mail | index | archive | help
I have a jail where the www user runs hourly cron jobs. On rare occasion, these jobs get stuck in a seemingly infinite CPU loop - a Python script calls Ghostscript and that child process never returns - and I have to manually kill them. I'd like to use login.conf to set resource limits so that I don't have to do this myself, but they don't seem to be applied. Here's a snippet of my login.conf: www:\ :cputime=300:\ :tc=default: I've run "cap_mkdb /etc/login.conf" to make that live. Then, I used vipw to change www's class: www:*:80:80:www:0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin However, I can trigger the error condition and watch the child Ghostscript process run for 6-7 minutes before I kill it. It's my understand that cron uses the limits from login.conf. Any idea what I might be doing wrong and causing it not to do so? -- Kirk Strauser
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43B3CD0F-BDCB-4DEC-9E17-E0D7A8287FDE>