Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Working around limit to number of connections vis Net::OpenSSH

by salva (Canon)
on Mar 28, 2017 at 07:35 UTC ( [id://1186204]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Working around limit to number of connections vis Net::OpenSSH
in thread Working around limit to number of connections with Net::OpenSSH

Looking at the code excerpt you have posted, it seems unlikely that you need the 256 files opened simultaneously. Probably, your code or some of the modules you are using or the OpenSSH binary is leaking file descriptors in some way.

Increasing the available file descriptors is just going to hide and delay the issue but not to solve it.

Net::OpenSSH has a debug mode you can enable setting $Net::OpenSSH::debug=-1, and you can also pass the flags -vvv to the ssh client in order to find where your program is failing.

Replies are listed 'Best First'.
Re^4: Working around limit to number of connections vis Net::OpenSSH
by nysus (Parson) on Mar 28, 2017 at 10:42 UTC

    I agree. I'm just happy to figure out why the code wasn't working. Ideally I'd like for the new file objects to re-use an existing Net::OpenSSH object or destroy existing objects that use the connection. I'm currently trying to figure out how to do that.

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

      You should be able to reuse the Net::OpenSSH object/connection as many times as you like.

      AFAIK, nor the module, neither ssh leak file descriptors, so the issue is probably in your code...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1186204]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-25 19:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found