DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Posts
    70

    what does "close wait" and "fin_wait2" means?



    1. what does "close wait" means?
    2. what does "fin_wait2" means?

    i understand that these are socket status but
    - what do they mean? the socket is waiting for server? the socket is shutting down but waiting for certain event to happen before it's allowed to shutdown?
    - what situations causes them?
    - it seems that the socket is waiting for something, how can i stop the close wait/fin_wait2 and shutdown the socket? (gracefully or forcefully)

    it seems that sockets on "close wait" and "fin_wait2" on my program are the ones with problems

    please advise

  2. #2
    Join Date
    Nov 2003
    Posts
    4,118
    A quick search on Google reveals the following"

    "FIN_WAIT2 is a state when the server closes the socket on its side but
    does not receive an acknowledgement of the close from the client. Does
    your application open and close a lot of connections? When you close on
    the client side do you use the Connection.close() method? "

    CLOSE_WAIT also seems fishy: http://www.nowsms.com/framer.htm?htt.../485/4021.html
    In short, yes, these statuses indicate bugs either on your side or a the socket libraries you're using. And yes, they have an adverse impact on performance.
    Danny Kalev

  3. #3
    Join Date
    May 2004
    Posts
    70
    Quote Originally Posted by Danny
    A quick search on Google reveals the following"

    "FIN_WAIT2 is a state when the server closes the socket on its side but
    does not receive an acknowledgement of the close from the client. Does
    your application open and close a lot of connections? When you close on
    the client side do you use the Connection.close() method? "

    CLOSE_WAIT also seems fishy: http://www.nowsms.com/framer.htm?htt.../485/4021.html
    In short, yes, these statuses indicate bugs either on your side or a the socket libraries you're using. And yes, they have an adverse impact on performance.
    thanks for your reply

    yes, u guessed correct. my application open and close many many connections in a short time (about 20)

    i dont use Connection.close() , but i use the closesocket() api. closesocket() should work right?





    Code:
    	closesocket(theSocket);
    	WSACleanup();
    
    	return 0;
    }

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links