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.2 required=3.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_BLOCKED,URIBL_BLOCKED shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: yahns-public@yhbt.net Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) (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 BF45C1FABD for ; Sat, 9 May 2015 09:06:54 +0000 (UTC) Received: by layy10 with SMTP id y10so66514364lay.0 for ; Sat, 09 May 2015 02:06:53 -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:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=DbzW4qRKopfwFOHx40mSlVTQvI6Ma7tna2d5LaFpKKo=; b=UigLyFZCEx9XUpR+X2nxJeSmlYX0YdLxNTlG46/cgqkdzjk9cvcoNEOXADOmXfJVD/ JTr8fip7k5cHHUyk/YS56puF/t9njzVFIpnwVqfZ90bc4unj0/DiY5zLwls7Hs5+NJUR fOnNl9RDN2kcC+WijrqHyNSyDae4dByAcq5irh3Lu9dIW8WLwCdrn43Wme5t5Mce0WJ3 8UtbixLortYtoy8O3dAeAzCfXUUlxUuIFsYNv3l+7fTuNiBzdDxeJ04Dfi+blb1SmIY2 qgnWBkdt1M5MQ+Kdh1fK+YM1WkYhzAvZi6wmctaF5huCDZvwlJlf+3yrMQb96biGfw1u I/OQ== X-Gm-Message-State: ALoCoQlKHrwAE2nqAg3LoPkWNAd3dmWWp8DNx9FBqQVq8ZYEQafAZaT59I6UBQ06+lMEg3mNfX/Z X-Received: by 10.152.246.34 with SMTP id xt2mr1410017lac.110.1431162413019; Sat, 09 May 2015 02:06:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.149.71 with HTTP; Sat, 9 May 2015 02:06:22 -0700 (PDT) In-Reply-To: <20150509084733.GA4603@dcvr.yhbt.net> References: <20150508170311.GA1260@dcvr.yhbt.net> <20150509010349.GA23261@dcvr.yhbt.net> <20150509084733.GA4603@dcvr.yhbt.net> From: "Lin Jen-Shin (godfat)" Date: Sat, 9 May 2015 17:06:22 +0800 Message-ID: Subject: Re: What would happen if a worker thread died? To: Eric Wong Cc: yahns-public@yhbt.net, wildjcrt@gmail.com Content-Type: text/plain; charset=UTF-8 List-Id: On Sat, May 9, 2015 at 4:47 PM, Eric Wong wrote: > "Lin Jen-Shin (godfat)" wrote: >> A backtrace for knowing what's happening I think is quite enough for me now. >> Still curious though, could this worker do anything else if this happened? >> I am guessing that if the application no longer does anything, then this worker >> would not do anything. Or the socket might timeout eventually? > > It depends on the application structure. > Often apps have very different code paths for different endpoints so > some endpoint being fatally broken may not affect others. A simple > endpoint (e.g. static files) could function at 100% and serve other > clients without any problems. > > Eventually the socket will timeout if the client_expire_threshold is > reached, otherwise it's fairly harmless to keep the socket around > (aside from memory overhead). Great! I was just worried that idled workers would get piled up and eventually no other workers would be able to do any work. As long as there's a timeout for this and it could recover itself, I think this is could be the best solution given all the trade off. Thank you!