Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-10-07
3
Medium Priority
?
1,756 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 2000 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month10 days, 22 hours left to enroll

886 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