Subject: | Gearman::XS::Worker possible bug/deficiency |
Date: | Mon, 03 May 2010 19:53:34 +0200 |
To: | bug-Gearman-XS [...] rt.cpan.org |
From: | Marinos Yannikos <mjy [...] pobox.com> |
Hi,
Gearman::XS::Worker 0.10 dies with SIGPIPE when a worker writes the reply
shortly after the gearmand dies. I think this is not the desired behaviour and
it should return a proper error code for the work() method instead (or possibly
try to reconnect). One reason why this is not very helpful is that it will only
terminate workers that are currently processing a job while the others will
happily try to reconnect until the server is alive again. So with typically
short jobs, it introduces a rare error condition.
This can be reproduced with a worker that just sleeps for a while (e.g. the
typical "sum" example with a sleep(10) somewhere) and by killing the gearmand
while the worker is working.
Regards,
Marinos