Skip to content

Add option to close connections after use #818

Closed
@bitprophet

Description

@bitprophet

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions