[erlang-questions] Is lhttpc project alive?

Danil Zagoskin z@REDACTED
Thu Jun 12 06:23:07 CEST 2014

Hi Paulo!

Yes, the bug is quite simple but annoying. First, how lhttpc works:
  * before each request the client makes call to lhttpc_manager to check if
there is a free socket for an endpoint:
  * lhttpc_manager holds all sockets which aren't in use
  * it handles 'closed' messages from sockets:
  * the function remove_sockets calls 'close' on socket one more time:
  * actual call to corresponding handling module is at

The problem is in ssl:close — it may block for many seconds, causing
lhttpc_manager not to serve client requests and thus preventing all new
requests from running. Some requests will fail with 'timeout' which seems
like bad service on the other side.

Currently we use such simple hack to workaround the problem:
  * replace ssl:close(Socket) on lhttpc_sock.erl#L176 with
proc_lib:spawn_link(ssl, close, [Socket])
This may lead to other problems (no control of spawned processes) and does
not solve the problem completely (there are some minor blockings on
setopt), but works as quick fix.

On Wed, Jun 11, 2014 at 10:20 PM, Paulo F. Oliveira <
paulo.ferraz.oliveira@REDACTED> wrote:

> Hi, Danil.
> Do you have more information on "I've found a bug in original lhttpc
> causing manager (and thus all new requests) to block but I don't know where
> to report it." that you can share? I've been using lhttpc lately and may
> profit from a resolution to your problem, seeing that I too seem get to a
> situation where new requests are "blocked" but haven't had time to run
> after that "bug".
> Thanks.
> Cheers.
> - Paulo F. Oliveira
> On 10 June 2014 21:40, Danil Zagoskin <z@REDACTED> wrote:
>> Hi!
>> The project https://github.com/esl/lhttpc seems to be abandoned (many
>> open issues including 17.0 compatibility, almost no activity since January
>> 2013).
>> There are some forks: some do simple fixes and some (rymir, jbothma) do
>> heavy refactoring.
>> Is any of forks the new default?
>> Is https://github.com/ferd/dlhttpc production-ready drop-in replacement?
>> I've found a bug in original lhttpc causing manager (and thus all new
>> requests) to block but I don't know where to report it.
>> --
>> Danil Zagoskin | z@REDACTED
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions

Danil Zagoskin | z@REDACTED
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140612/9d31f6e0/attachment.htm>

More information about the erlang-questions mailing list