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

Hello Monks, I appeal to your wisdom for an advice.

I have an "unable to fork ssh master: can not allocate memory" error when using Net :: OpenSSH-> new.
I know that this kind of error is spy for unoptimized code, but unfortunately I have a code of 9000 lines that I can't for obvious reasons post (and I know that's very blamable). I am also aware that with a code so long the chance to have bug in the code is virtually 1.

The only thing I ask is: is it possible to have a "can not allocate memory" if checking the program execution with "top" I see that the memory allocation is practically negligible? How can it be?

Thank you all.
  • Comment on Net::OpenSSH memory allocation error with seemingly low memory code

Replies are listed 'Best First'.
Re: Net::OpenSSH memory allocation error with seemingly low memory code
by salva (Canon) on Dec 15, 2014 at 15:57 UTC
    fork is failing for some reason. You must investigate why!

    Try running your program under strace in order to see what is happening at the OS level.

      Is the most reasonable thing indeed. Thank you.