Solved

Clearing hung CLOSE_WAIT TCP/IP  connections on a FreeBSD server.

Posted on 2004-10-07
3
1,683 Views
Last Modified: 2013-11-22
I am using proftpd on  a FreeBSD 4.0 server.  After I disconnect from the ftp server there are multiple TCP connections in the CLOSE_WAIT state when I run a netstat.

tcp4       0      0  mymachine.ftp           x.x.x.5.4964        CLOSE_WAIT
tcp4       0      0  mymachine.ftp           x.x.x.4.4956        CLOSE_WAIT

Here is what I have in the proftpd.conf file

TimeoutLogin                    120
TimeoutIdle                      300
TimeoutNoTransfer            600
TimeoutStalled                  900
TimeoutSession                 1000

I also run ipfw on this server and tried the following commands to get rid of these hung connections:
net.inet.ip.fw.dyn_ack_lifetime=400

Is there a way I can make these CLOSE_WAIT sessions expire quickly?
0
Comment
Question by:mvars
3 Comments
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 12252336
This is normal behavior.
Use maxusers=512 if this hits any system limits (I doubt).

These parameters affect this aspect of network
net.inet.tcp.keepidle: 7200000
net.inet.tcp.keepintvl: 75000
net.inet.tcp.keepinit: 75000
net.inet.tcp.always_keepalive: 1

(times in slowhz, i.e. half-seconds)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CPU monthly average? 12 132
AIX    Volume group Auto ON/OFF question 2 116
UNiX Script filesystem space usage 19 77
Expand a partition in Centos 7 Linux with Virtualmin 1 69
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question