drbrain/net-http-persistent — pull request #42 by raggi (2013-06-05 20:45:54+00:00)
Title: Add Persistent#max_requests to prevent ECONNRESET

* Many servers have a max_requests tunable on keepalive connections that is
tuned to less than infinite. Some of these servers incorrectly close the
connection out-of-band (rather than replying with Connection:close). In these
cases, it is advantageous to avoid the resulting ECONNRESET, and preemptively
reset those connections.
* Additional potential work that could be done later: Make a closing request on
the last request. Add a detect_max_requests helper at the top level.
* Exmaple configuration link:
http://wiki.nginx.org/HttpCoreModule#keepalive_requests