Jacob S
2005-02-12 14:50:10 UTC
I have a simple download script that runs from a cron job every morning
to pull an audio stream from a url and then convert it to mp3 (the
script is attached to this e-mail). It runs fine the first couple times
after a reboot, but then fails at various stages, leaving these messages
in my mailbox:
/home/jacob/bin/download.sh: fork: Cannot allocate memory
/home/jacob/bin/download.sh: xrealloc: ../bash/subst.c:468: cannot
reallocate 99 178368 bytes (0 bytes allocated)
When it gives the fork error, it has usually made it through the mplayer
section but not lame. When it gives the xrealloc error it doesn't even
make it that far. However, when I run this script manually from a
command line it works perfectly.
The computer is an Athlon 2200+XP on a NForce2 chipset with 512MB of ram
and 160GB SATA. Here is an example output from 'free' after the cron job
has failed, but running the program manually worked fine:
$ free
total used free shared buffers cached
Mem: 516308 514288 2020 0 1712 101836
-/+ buffers/cache:410740 105568
Swap: 497968 467868 30100
Any suggestions what might be causing this out of memory problem, or
ways to work around it?
TIA,
Jacob
to pull an audio stream from a url and then convert it to mp3 (the
script is attached to this e-mail). It runs fine the first couple times
after a reboot, but then fails at various stages, leaving these messages
in my mailbox:
/home/jacob/bin/download.sh: fork: Cannot allocate memory
/home/jacob/bin/download.sh: xrealloc: ../bash/subst.c:468: cannot
reallocate 99 178368 bytes (0 bytes allocated)
When it gives the fork error, it has usually made it through the mplayer
section but not lame. When it gives the xrealloc error it doesn't even
make it that far. However, when I run this script manually from a
command line it works perfectly.
The computer is an Athlon 2200+XP on a NForce2 chipset with 512MB of ram
and 160GB SATA. Here is an example output from 'free' after the cron job
has failed, but running the program manually worked fine:
$ free
total used free shared buffers cached
Mem: 516308 514288 2020 0 1712 101836
-/+ buffers/cache:410740 105568
Swap: 497968 467868 30100
Any suggestions what might be causing this out of memory problem, or
ways to work around it?
TIA,
Jacob