Add option to close connections after use #818

bitprophet opened this Issue Jan 11, 2013 · 0 comments


None yet

1 participant


Right now, Fab's default mode of operation is:

  • Derive host list
  • Iterate host list of size N
    • Open (& cache) connection to host 1, then 2, ..., then N
  • Close all N cached connections

When N is larger than one's local "number of open files/sockets" settings (or, apparently, even when it is not -- I have run into oddball issues I suspect to be due to this, despite ulimit and sysctl being generous about open files) this behavior can cause Fab to hang or terminate.

It is also just inefficient for situations where a user is never or rarely returning to previous hosts -- I recall some users having problems with networking (e.g. their, or their target's, firewall) even if their workstation itself allows opening many sockets.

It should be possible to add an option such that normal use of fab with this option on, closes each connection at the end of the loop body instead of after loop termination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment