tsloughter/erlastic_search — pull request #8 by marcelog (2013-09-26 22:18:13+00:00)
Title: new param ctimeout, updated to hackney 0.4.4

Hello,

I had a use case where elasticsearch was not able to respond to the request (a bad-index situation, but nvm), and connections started to stack up, until the erlang vm crashed because of too many emfile errors (and supervisors reaching the max restart intensity).

Testing a bit using `nc -l 127.0.0.1 9200` (i.e: starting a server that could accept the connection but not serve the response) showed that using **#erls_params.timeout** would not help in that situation (the connections where still being kept open without timing out).

What did work is to use the new hackney option [connection_timeout](https://github.com/benoitc/hackney/commit/17c0f4c6c8f1d66613c7739c05c7bef7b950cf39) which is in version 0.4.1 (the one in rebar.config is 0.4.0, and i went a bit further, up to 0.4.4).

Hope this is an acceptable update :)

best!