You must Sign In to post a response.
  • Category: ASP.Net MVC

    System.InsufficientMemoryException: Insufficient winsock resources available to complete

    Hi Friends,

    We are getting the below memory leakage exceptions when we are calling the WCF services from ASP.NET MVC application.

    Please provide expert suggestions or solutuion.

    EXCEPTION: System.InsufficientMemoryException: Insufficient winsock resources available to complete socket connection initiation. ---> System.Net.Sockets.SocketException: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full 10.7.162.159:808
    at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
    at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
    at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)


    Thanks & Advance Wishes!!!!

    Ramesh Muthiah
  • #769702
    Some where in your wcf program logic, network related objects used and those are not disposed hence causing the above mentioned issue.

    What exactly happening when you use network streams open is, your computer might have limited connections and you are creating and not disposing then after reaching max connections in memory then future request can't make hit and throws memory exception.

    If you can share logic of wcf then we can predict the exact cause

    Thanks!
    B.Ramana Reddy


  • Sign In to post your comments