[erlang-questions] Fwd: poolboy new_worker failed cause poolboy crashed
Thu Apr 16 03:19:44 CEST 2015
I add a proxy process to handle the issue (
wired if connect redis timeout, proxy process sometimes will be shutdown
although I set trap_exit = true.
I test it , find all connections timeout when multi client call connnect
simulataneous, after eredis_client exit info received, eredis_proxy will be
shutdown. I have totally no idea about it.
Did I miss something?
2015-04-14 19:01 GMT+08:00 linbo liao <llbgurs@REDACTED>:
> Thanks, looks a nice way to solve the issue, I will create a proxy worker
> to have a try.
> 2015-04-14 16:49 GMT+08:00 José Valim <jose.valim@REDACTED>:
>> You don't need to modify eredis per se. You can create a worker that is
>> between poolboy and eredis that tracks the connected/disconnected semantics
>> as Devin described. Unfortunately I don't know of any sample Erlang code
>> but, if you don't mind, here is a similar solution using redo written in
>> To use it, you checkout the worker above from the pool, ask the redis
>> connection to the worker and do the operations you want to in the
>> connection as usual.
>> As a note, I did find it a bit weird that eredis handles disconnects
>> automatically but it does not handle the case where it can't connect to
>> Redis on start_link. It would be handful if they supported lazy connections
>> (i.e. don't connect on start_link but on first command). They already have
>> all the code to handle this, it is just a matter of supporting it on
>> start_link too.
>> *José Valim*
>> Skype: jv.ptec
>> Founder and Lead Developer
>> On Tue, Apr 14, 2015 at 10:26 AM, linbo liao <llbgurs@REDACTED> wrote:
>>> I open an issue for poolboy (
>>> https://github.com/devinus/poolboy/issues/72), but looks author doesn't
>>> think this is an issue.
>>> Looks like to solve this issue have two ways:
>>> 1. Modify eredis client, start_link still return ok when connect
>>> failed, and when use it should check eredis socket alive or not
>>> 2. Modify poolboy library, protected all logic when call new_worker
>>> But it require change ereids or poolboy code, I was wondering to know
>>> anyone hit this issue, how to resolve it?
>>> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions