From owner-freebsd-net@FreeBSD.ORG Mon Jul 18 06:48:04 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9872E106564A for ; Mon, 18 Jul 2011 06:48:04 +0000 (UTC) (envelope-from vladimir.budnev@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4E9EE8FC0A for ; Mon, 18 Jul 2011 06:48:03 +0000 (UTC) Received: by vws18 with SMTP id 18so2724508vws.13 for ; Sun, 17 Jul 2011 23:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=m2RsVkSKPzJFxjQA/PzngkgH5rVa9HQP12GaO7d5MtE=; b=Ui3wo/Sje9QbxxfLtUrjo/bxwtcZW2IoluT1FG8//PIz9kd1qrzEzWbYMBPg3/DlKf +zPcFeMVC4lHUl2ubQFcEcMjJ1L3zq3u1bM15QItlpjgYJEMgu8arn7+MMBaf7gmFnv2 ByG2qHHOZXOuVuW0rnkkSJiH2RTLoNmCJSsGM= MIME-Version: 1.0 Received: by 10.220.108.77 with SMTP id e13mr683234vcp.79.1310971683243; Sun, 17 Jul 2011 23:48:03 -0700 (PDT) Received: by 10.220.178.129 with HTTP; Sun, 17 Jul 2011 23:48:03 -0700 (PDT) In-Reply-To: <4E21AE1B.6070000@freebsd.org> References: <4E21AE1B.6070000@freebsd.org> Date: Mon, 18 Jul 2011 10:48:03 +0400 Message-ID: From: Vladimir Budnev To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: (TCP/IP) Server side sends RST after 3-way handshake.Syn flood defense or queue overflow? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2011 06:48:04 -0000 > When you enable "net.inet.tcp.log_debug=1" it will tell you at LOG_DEBUG > level what went wrong and why it sent the RST. > Thank you Andre. Now its clear what causes the problem, here is what i got in logs: Jul 18 10:33:55 kernel: TCP: [127.0.0.1]:52971 to [127.0.0.1]:10002 tcpflags 0x10; tcp_input: Listen socket: Socket allocation failed due to limits or memory shortage, sending RST I'v decided not to tune system parametrs cause it looks like a "crutch". I'll rewrite data sending mechanism to "one connection and stream transmission fro all chunks" instead of "one connection for each data chunk". That way there will be no more huge connections amount per second to the server side.