That error means that the ssh connection was broken, and it doesn't really have anything to do with Perl. It could be for lots of different reasons, but often with SSH, the connection is dropped due to inactivity - if you're doing 20k devices from 16 processes, it's possible one of them is getting starved. Some commonly given advice for this issue is to put the following in your ~/.ssh/config:

Host * ServerAliveInterval 60

However, with this many connections to this many devices, it's also possible the issue is somewhere else, and that it either has to do with the large amount of connections you're opening, or that those devices you're having trouble with actually have issues on their end. You can try running a Wireshark trace and then filtering by IP afterwards with the IPs that were giving you trouble, so you can possibly get an idea that way.


In reply to Re: packet_write_wait: Connection to xx.xx.xx.xx port 22: Broken pipe by haukex
in thread packet_write_wait: Connection to xx.xx.xx.xx port 22: Broken pipe by TusharK

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.