From owner-freebsd-questions@freebsd.org Fri Jul 26 13:25:20 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0DC5A1469 for ; Fri, 26 Jul 2019 13:25:20 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2D269CB3 for ; Fri, 26 Jul 2019 13:25:20 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: by mail-pf1-x444.google.com with SMTP id m30so24543465pff.8 for ; Fri, 26 Jul 2019 06:25:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=CGiid3oXBFGgM4c1hGhfCc30kA4cCELYb3vJS+Ap9MQ=; b=MjOvoUKwWWAVkbSVDKfeoxuNf2MxYFy+XrQ0zFtSIyB29AOykkBdGFDWCiSdohgL/w 4pZk3Yu0TeacY3Cz9oEKG+tYIVbSqxbk7ToiXMs6G32f4SrnTRTCa1okDL0uqLaVM8K5 USMJrq8uLEkLFYgaTEvVR6jWdm32hIsODSrckswDgyv/bh0Uy2KJSAzI1CSMFGvhkZV8 ENgqb8SmHhWOGbqiW23UtOOxJs0BsHELYWiocGu58LrHAAX4qAfOnwTiRexCy9HdlsxP aSiwyCPCM8cLwK+mfYyy4IJYxF0D4phcYs8Q6EnUPxaO5d8QKkuS8MP2lShI5Hnwd70z pAaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=CGiid3oXBFGgM4c1hGhfCc30kA4cCELYb3vJS+Ap9MQ=; b=YMYgEedF78iZ49skIv6sIAZ+tdH2ujuLO6G1BuUPto9jbe/dDuibIYVTVJHttJjPOW iGq9CULcQXiPF1onchiVfakGXj+vA5lQPAsEdW9d1Wg+QCpBrISIpaiH1hYHOE9nN1kN ZRZTRp7eDbaO538ybRzvZeS8j7yVKEEUbiBCt76Jxwlm057nP7rbU82vs9UAPfj/TnJt 4QY9spudWtNY4fk9EYaoPTRnHg5iAXp8O+ZbR9eUt1VpqwP35f1EbZcSP1wgoMx6oeoQ GC1tgLneu3tyPjCHcKOcVRvNSiYb6csLOPYUW7ln8CiDMOSUhKyTM4yP3ACSmynafN4w gVqA== X-Gm-Message-State: APjAAAUlTRURu9YTfIOlUWom8zmwuM8jxFcxJdrGizarF3VNtwXH/xnq KgVR8NYC1wuxoQOeE9lPKIwlbaO/oAA= X-Google-Smtp-Source: APXvYqw1JUcFwtK69trhiXPZbip9AymyKieZHM1ey1cZoPm/5CtacPmRd79xgJNhatjC2K7boYCpMw== X-Received: by 2002:a63:2a08:: with SMTP id q8mr59250168pgq.415.1564147519134; Fri, 26 Jul 2019 06:25:19 -0700 (PDT) Received: from [192.168.1.10] ([210.9.159.55]) by smtp.gmail.com with ESMTPSA id q1sm74065974pfn.178.2019.07.26.06.25.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jul 2019 06:25:18 -0700 (PDT) Subject: Re: Help:: Listen queue overflow killing servers To: freebsd-questions@freebsd.org References: <3a62375a-432c-3533-a7bc-e5573c26fa9c@ifdnrg.com> <92866b76-5f11-2523-cc8f-0d92cc91a50e@bytecamp.net> From: MJ Message-ID: <22f7262b-eda8-f9d1-8836-61bcea8e1c5f@gmail.com> Date: Fri, 26 Jul 2019 23:24:50 +1000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 4B2D269CB3 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=MjOvoUKw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mafsys1234@gmail.com designates 2607:f8b0:4864:20::444 as permitted sender) smtp.mailfrom=mafsys1234@gmail.com X-Spamd-Result: default: False [-5.13 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-1.18)[ip: (-0.30), ipnet: 2607:f8b0::/32(-3.09), asn: 15169(-2.44), country: US(-0.05)]; RCVD_IN_DNSWL_NONE(0.00)[4.4.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jul 2019 13:25:20 -0000 On 26/07/2019 11:08 pm, Paul Macdonald via freebsd-questions wrote: > > On 26/07/2019 13:52, Robert Schulze wrote: >> Hi, >> >> Am 26.07.19 um 13:58 schrieb Paul Macdonald via freebsd-questions: >> I think, these processes waiting for disk i/o are actually your problem. >> Since they cannot answer further requests, they run into the listen >> queue overflow. >> >> You should check the processes with procstat: >> >> list kernel threads: >> # procstat -kk >> >> list open files: >> # procstat -f > > > One of the things we do (whihc may be bad)  is to log to a single file > ( e.g all.sites.log, this doesn;t seem to cause problems in general , > but i can see how if there's X child processes then they may all need > write locks) > Unless it's hammering the log and there's locks on it. > Is that a really bad idea? ( Often handy to have one file for > differnet vhosts, but maybe that needs a rethink) Syslog works this way. > > In this case the drive is NVMe, and there's actually  only a handful > of sites, (Other servers have several hundreds of sites, much busy but > don;t display  the issue) > > In answer to some of the other suggestions, its not actually under > high load ( 5000 lines in the apache log for the whole day), and > system has 16C/32T,  128GB RAM > > ZFS is using a bunch of RAM as i've not limited the ARC, but there's > 27GB free currently. > > I guess i actually have 2 questions > > 1) why are the queues filling up (i'll  revert to seperate logs to see > if that helps, although the issue is sporadic, and first time on this > box) > Most likely (given limited information) because the processes are disk bound doing something. They're not able to service the queue, thus leaving a growing queue for the system. > 2) Once the queues are over limit, is this actually unresolvable other > than a hard reboot? > No, you can keep running, you'll just get worse and worse... :-( You need to track down what the processes are doing, as per others' suggestions, and then work back from there. > > >> with kind regards, >> Robert Schulze >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to >> "freebsd-questions-unsubscribe@freebsd.org" >>