You are not logged in.

#1 2012-04-10 22:40:45

ajratcliffe
Member
Registered: 2011-10-25
Posts: 6

Cron running Perl script causes Out Of Memory at 63000kb

Hi,

I run a script to record an internet steam at set times using cron (i'm using icecream, a perl script). This runs fine when executed by 'at' or manually form the command line, but when it is started by cron it dies with the error 'Out of memory!'. The machine isn't extremely powerful but is more than capable of doing this simple task!

From my research I understand that it may have something to do with the /etc/security/limits.conf file, though apparently changing these values often don't have the desired effects.

The output of 'ulimit -a' is as follows (I can't see any limiting factors here):

[aratclif@server ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 1931
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1931
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[aratclif@server ~]$ 

and the crond.log output when it died is here (there is nothing else of any relevance in the log - just a load of song names broadcasted by the stream!)

(aratclif) CMDOUT (
LED ZEPPELIN - WHOLE LOTTA LOVE [63000 K]Out of memory!)

The command is started by my user's crontab and so the ulimit displayed by cron is the same as when executed from the command line:

Apr 10 23:06:01 localhost /USR/SBIN/CROND[1308]: (aratclif) CMD (ulimit -a)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (core file size          (blocks, -c) 0)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1309]: (CRON) EXEC FAILED (/usr/sbin/sendmail): No such file or directory
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (data seg size           (kbytes, -d) unlimited)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (scheduling priority             (-e) 20)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (file size               (blocks, -f) unlimited)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (pending signals                 (-i) 1931)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (max locked memory       (kbytes, -l) 64)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (max memory size         (kbytes, -m) unlimited)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (open files                      (-n) 1024)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (pipe size            (512 bytes, -p) 8)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (POSIX message queues     (bytes, -q) 819200)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (real-time priority              (-r) 0)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (stack size              (kbytes, -s) 8192)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (cpu time               (seconds, -t) unlimited)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (max user processes              (-u) 1931)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (virtual memory          (kbytes, -v) unlimited)
Apr 10 23:06:01 localhost /USR/SBIN/CROND[1307]: (aratclif) CMDOUT (file locks                      (-x) unlimited)

Any help would be greatly appreciated!

Thanks!

Last edited by ajratcliffe (2012-04-10 23:13:01)

Offline

Board footer

Powered by FluxBB