in reply to Working around limit to number of connections with Net::OpenSSH

250 sounds to me like the limit on the number of simultaneously open files for a process.

Are you really, really sure that the problem is with the part of the code you're looking at? Is there maybe some other place where you open a filehandle and don't close it soon enough?

Maybe you can write a small, self-contained program that reproduces the issue and doesn't need a remote ssh connection?

  • Comment on Re: Working around limit to number of connections vis Net::OpenSSH

Replies are listed 'Best First'.
Re^2: Working around limit to number of connections vis Net::OpenSSH
by nysus (Parson) on Mar 27, 2017 at 20:22 UTC

    Thanks. The remote file is never opened by the RemoteFile object and is read locally. Per your suggestion, and just to be safe, I commented that part out where the file gets downloaded and read and just used it to inspect the file properties (perms, whether it exists, etc.) and it still failed. Also, the number of runs it takes before it fails depends on how many other Net::OpenSSH objects already exist before it fails. So I'm pretty certain it has something to do with some kind of connection limit.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

Re^2: Working around limit to number of connections vis Net::OpenSSH
by nysus (Parson) on Mar 27, 2017 at 21:15 UTC

    Thanks, Corion. It was a file limit after all. See below.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks