biometrics74 has asked for the wisdom of the Perl Monks concerning the following question:

Wise monks I'm seeking guidance to resolve an error. While it's quite obvious that "there's not enough space", the question is how or where do I add more space?

This is the error:

open3: fork failed: Not enough space at /usr/local/perl5.8.8/lib/site_perl/5.8.8/HTML/HTMLDoc.pm line 1051

This is code in HTMLDoc.pm

# create new Filehandles my ($stdin,$stdout,$stderr) = (IO::Handle->new(),IO::Handle->new(),IO: +:Handle->new()); <b>my $pid = IPC::Open3::open3($stdin,$stdout,$stderr, $command);</b> if (!$pid) { $self->error("Cannot fork [COMMAND: '$command']."); return (0); }

Operating System: Solaris 10

Please be kind. This is my first question, and I'm only new to Perl (and Unix / Solaris), having come from a Microsoft .Net background.

Replies are listed 'Best First'.
Re: Not enough space at ... HTMLDoc.pm
by cdarke (Prior) on Aug 18, 2010 at 07:34 UTC
    Welcome to perlmonks! I would look at two things, first, what is the command ($command) that you are attempting to execute. Second, look at where you are trying to execute it. For example, maybe this is being executed in an loop and it attempting to create thousands of processes. There is a limit on the number of processes you can create (which is implementation dependant).

      I can only assume the command being run is the HTMLDoc binary since the HTMLDoc.pm module is a perl interface to HTMLDoc.

      The snippet in my original post is only called once (to convert a HTML file to PDF) which would eliminate the possibility of thousands of processes being called.

      Additionally this error only occurs on the 'production' server, so the amount of debugging is limited (e.g. almost none).

      There seems to be enough swap-space. I've been monitoring it from time-to-time, the below is typical.

      swap -l swapfile dev swaplo blocks free /dev/swap 0,0 8 8228264 3407016
Re: Not enough space at ... HTMLDoc.pm
by Anonymous Monk on Aug 18, 2010 at 06:56 UTC
    http://www.shmoo.com/mail/fw1/sep98/msg00124.html
    > you've run out of memory on your system. > > do one of three things.. > 1) increase that amount of real memory > 2) increase the amount of swap space > 3) run /usr/ucb/ps ugxaww as a possibility to see what process is us +ing all the memory....