|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
clear CLOSE_WAIT status
Hi,
I have an application with a bug in it that keeps sockets in CLOSE_WAIT, which eventually freezes the server because the user account it runs under runs out of file handles. We have the bug fixed but can only release the fix with the next release. Does anyone know how I can clear the sockets in CLOSE_WAIT status? This way I won't have to restart the application server every other day... We have Red Hat Enterprise 4. Thanks, Reinout |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
You need to look into sysctl document
You can tune many of TCP/IP related parameters from procfs/sysfs
See to document /usr/src/linux/Documentation/networking/ip-sysctl.txt Example, for TCP there are following files /proc/sys/net/ipv4/tcp_* Remember changes in those file will be temperal and will not remain after system reboot. To make it parmenant you need to create "/etc/sysctl.conf" entries. Look man sysctl Also if you can do socket shutdown then socket close in your application then it also overcome our problem |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
As sumitpandya indicated your code has a problem.
There have been some posts lately about this problem, try searching using the "search" button and "CLOSE_WAIT" |
|
#4
|
|||
|
|||
|
I know the problem is in our code and we have a fix for it but we can't role it out immediately in a production environment. Clearing the CLOSE_WAIT is just an emergency solution, and better then restarting the application servers daily.
We're planning a new release tomorrow that should fix the problem. The fix is using a multithreaded connection pool instead of openening a new connection per request which in case of a probable memory leak causes the socket to stay occupied while being in CLOSE_WAIT. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Too many CLOSE_WAIT connections | Duffs22 | Red Hat | 2 | 10-24-2011 06:57 AM |
| How to remove CLOSE_WAIT in Solaris | helplineinc | Solaris | 2 | 07-11-2009 06:39 AM |
| CLOSE_WAIT problem in solaris server | mgmk.84 | Solaris | 2 | 04-29-2009 10:55 AM |
| handling CLOSE_WAIT -TCP state | matrixmadhan | Programming | 16 | 09-16-2006 03:51 AM |
| remove CLOSE_WAIT connections | Livio | Solaris | 6 | 02-08-2006 04:21 AM |
|
|