From owner-freebsd-questions@FreeBSD.ORG Sun Feb 25 13:53:23 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E867E16A400 for ; Sun, 25 Feb 2007 13:53:23 +0000 (UTC) (envelope-from teklimbu@wlink.com.np) Received: from smtp5.wlink.com.np (smtp5.wlink.com.np [202.79.32.52]) by mx1.freebsd.org (Postfix) with SMTP id 17FAB13C471 for ; Sun, 25 Feb 2007 13:53:21 +0000 (UTC) (envelope-from teklimbu@wlink.com.np) Received: (qmail 61033 invoked from network); 25 Feb 2007 13:53:15 -0000 Received: from unknown (HELO smtp1.wlink.com.np) (202.79.32.76) by 0 with SMTP; 25 Feb 2007 13:53:15 -0000 Received: (qmail 97190 invoked by uid 98); 25 Feb 2007 13:53:15 -0000 Received: from 202.79.36.216 by smtp1.wlink.com.np (envelope-from , uid 1009) with qmail-scanner-1.25 (clamdscan: 0.88.4/2205. Clear:RC:1(202.79.36.216):. Processed in 0.029901 secs); 25 Feb 2007 13:53:15 -0000 X-Qmail-Scanner-Mail-From: teklimbu@wlink.com.np via smtp1.wlink.com.np X-Qmail-Scanner: 1.25 (Clear:RC:1(202.79.36.216):. Processed in 0.029901 secs) Received: from [202.79.36.216] (HELO teklimbu.wlink.com.np) by smtp1.wlink.com.np (qmail-smtpd) with SMTP; 25 Feb 2007 13:53:11 -0000 (Sun, 25 Feb 2007 19:38:11 +0545) Received: from teklimbu.wlink.com.np ([202.79.36.216]) by teklimbu.wlink.com.np with smtp (Exim 4.66) (envelope-from ) id 1HLJoL-0007f2-8n; Sun, 25 Feb 2007 19:38:09 +0545 Date: Sun, 25 Feb 2007 19:38:04 +0545 From: Tek Bahadur Limbu To: Grant Peel Message-Id: <20070225193804.19bc9280.teklimbu@wlink.com.np> In-Reply-To: <00aa01c758c6$f8dadb90$6501a8c0@GRANT> References: <00aa01c758c6$f8dadb90$6501a8c0@GRANT> Organization: Worldlink Communications Pvt. Ltd. X-Mailer: Sylpheed version 2.2.0 (GTK+ 2.8.12; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Check-By: smtp1.wlink.com.np Spam: No ; 0.4 / 7.0 X-Spam-Status-WL: No, hits=0.4 required=7.0 Cc: freebsd-questions@freebsd.org Subject: Re: Fw: FIN_WAIT_2 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Feb 2007 13:53:24 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, 25 Feb 2007 05:23:20 -0500 "Grant Peel" wrote: > my problem is that so many of my vm-pop3d processes get in that > state that semi-frequently, we get locked out of downloading email. > > I kill all the vm-pop3d processes then we have to wait for all the > FIN_WAIT_2 to die befor i can restart the vm-pop3d process. > > If I try to start vm-pop3d before all the FIN_WAIT_2 sockets die, I > get a 'Can't bind to port" error. > > When I do the lsof thing it shows no files or processes connected to > that port, or socket. Hi Grant, I also seem to getting the same problem as yours except that my server is a Squid proxy running on FreeBSD 6.0. Using netstat -an | grep tcp | awk '{print $6}' | sort | uniq -c gives the following: 23 CLOSE_WAIT 9 CLOSING 3955 ESTABLISHED 3342 FIN_WAIT_1 2604 FIN_WAIT_2 49 LAST_ACK 15 LISTEN 16 SYN_SENT 148 TIME_WAIT Then I start to get the following in my squid logs: 2007/02/25 17:10:37| comm_open: socket failure: (55) No buffer space available I tried by setting the variable net.inet.ip.fw.dyn_keepalive=0 but it didn't help that much. It is only after I stop Squid for about 20-30 seconds and restart it, will the number of connections start to drop. I think that the best way to tackle this problem is by using a firewall to rate-limit the number of connections per IP per time. > > -Grant > > > ----- Original Message ----- > > From: "Christian Walther" > > To: "Grant Peel" > > Cc: > > Sent: Saturday, February 24, 2007 9:53 AM > > Subject: Re: FIN_WAIT_2 > > > > > >> On 24/02/07, Grant Peel wrote: > >>> Hi all, > >>> > >>> Just wondering if anyone has found / knows of a way to kill > >>> sockets that are stuck in FIN_WIAT_2 state - without rebooting > >>> the server. > >>> > >>> When I kill the processes (in this case the pop3 server) that > >>> allows the connection, it still takes about 3 hours for the > >>> socket to time out and die. > >> > >> What is your problem with sockets being in this state? Normaly they > >> don't consume any resources that would lead to performance > >> problems. As you say, they die eventually. > >> Sockets in this state are no problem, it's just that the client > >> failed to sent the last ACK to the server, which would finally > >> close the communication. > >> > >> > > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > - -- With best regards and good wishes, Yours sincerely, Tek Bahadur Limbu (TAG/TDG Group) Jwl Systems Department Worldlink Communications Pvt. Ltd. Jawalakhel, Nepal http://www.wlink.com.np -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFF4ZTAVrOl+eVhOvYRAmWsAJ48mBKXDDYPIB+9Whgq2kl51JvIvACdHvR/ T73CpykghiHwlVZ4yCKxJE0= =UDbN -----END PGP SIGNATURE-----