From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Status: No, score=-1.1 required=3.0 tests=AWL,BAYES_00,URIBL_BLOCKED shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: yahns-public@yhbt.net Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 56B091F7CC for ; Fri, 8 May 2015 12:20:46 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2so51841405lbb.3 for ; Fri, 08 May 2015 05:20:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc :content-type; bh=/ds52qS+t6+t0oHx5wgRt8i+EqQW5kPmdZ9mKeE5xuI=; b=VdS8eRNfBrOVxcEIPzSVYUpfhKVFHxwRlKSjjxnkuLb5Vf+r+beiS9u/f8wS6ta6RR YLIdus1U4wBAcUan8jqdKp03rWKy0ajz/IdvIuJl+cFBVmaQpfjRzryTm7fjmSk2azq2 ebHXBuhsXM0n1XaHXVbIgVwovNF34/lNJ8Ho/7imqHgFJW4IjrzJX7dmmVbDMvIUWRIr RaB0y8MU5Sdl33lBbACgz9qeIHPYROmPGfF1Ps4j0+O5/w5lykRT2xZcAe0aRXN+IdZ8 OczzNVpupLJq6/DC+9RGad6/6/G6m+EMWXjUzwsoEwqwKbbhcWLLJwCAO6IbpodNnErn HEyw== X-Gm-Message-State: ALoCoQm6y6gDtGIZWvE1gv7HhWH1z3YEyhriwg7SnjSEoajvKL56NIgvJJHFDD1Cq7Ob29AJ0wzJ X-Received: by 10.152.43.110 with SMTP id v14mr2720030lal.4.1431087644281; Fri, 08 May 2015 05:20:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.149.71 with HTTP; Fri, 8 May 2015 05:20:13 -0700 (PDT) From: "Lin Jen-Shin (godfat)" Date: Fri, 8 May 2015 20:20:13 +0800 Message-ID: Subject: What would happen if a worker thread died? To: yahns-public@yhbt.net Cc: wildjcrt@gmail.com Content-Type: text/plain; charset=UTF-8 List-Id: Hi, We just tried running yahns on production, and would like to give some feedback. Eventually we turned back to Unicorn, but that's because apparently Rails, or to be specific, ActiveRecord (4.1.10) is not thread safe and giving random errors once in a while. However, we're also trying to split out an API server which is not running on Rails, therefore we should be able to use a threaded server. During the experiments, we found that whenever a worker thread died due to LoadError raised from the application, which is not a StandardError therefore was not rescued at all, crashing the worker thread (assumed, not verified). When this happened, the client just hanged forever with yahns. Is there something we can do about this? Would yahns respawn a new worker thread? Can we close the socket when this happen? I am aware that yahns is *extremely sensitive to fatal bugs in the applications it hosts*, so I am just curious. For reference, Puma would immediately close the socket without sending anything, and Unicorn would log the error backtrace and kill the worker (If I read it correctly). In this case, Unicorn helped me figure out what's happened. Cheers,