I am not concerned about the server running out of memory therfor ulimit will not help.
What I am concerned about is getting information that my app spent over 8 hours processing and prevent reports like this:
# more runfwrpt-20030829-0230
Out of memory during request for 24 bytes, total sbrk() is 317718640 bytes!
Out of memory during request for 1016 bytes, total sbrk() is 317718640 bytes!
Out of memory during request for 1016 bytes, total sbrk() is 317718640 bytes!
The above isn't a very usefull report...
Even if it only processed half of the files I'd rather have it spit out an error message, and report what it has processed so far. | [reply] |
See the entry for $^M in perlvar(1):
By default, running out of memory is an untrappable, fatal error. However, if suitably built, Perl can use the contents of "$^M" as an emergency
memory pool after die()ing. Suppose that your
Perl were compiled with -DPERL_EMERGENCY_SBRK and
used Perl's malloc. Then
$^M = 'a' x (1 << 16);
would allocate a 64K buffer for use in an emergency. See the INSTALL file in the Perl distribution for information on how to enable this option.
To discourage casual use of this advanced feature,
there is no English long name for this variable.
| [reply] [d/l] |