Ask a questionAsk a question
 

AnswerKeep receiving WSAConnect Error 10048

  • Tuesday, November 03, 2009 3:29 PMCBannon Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have found that after sending multiple requests in rapid succession I keep getting a SOAPCLIENT_SEND_ERROR.  This is caused by an error from WSAConnect; WSAEADDRINUSE (10048) Address already in use.

    So it seems that the OS is holding onto the ports longer than I would expect it to and as it assigns the random ports for each connect eventually it gets back to one that's still being held up.

    Is there some way around this problem?

    Any help is greatly appreciated,

    CBannon

Answers

  • Tuesday, November 03, 2009 8:32 PMCBannon Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Figured out the problem is that I was requesting too many connections and it was eating up the ports.  The only change could be made to a registry key but that could have ill effects on other processes.

    Best solution is to just create and use a single TCP port to pass all the requests through instead of allowing the system to use up all available ports.

    CBannon
    • Marked As Answer byCBannon Tuesday, November 03, 2009 8:32 PM
    •  

All Replies

  • Tuesday, November 03, 2009 7:08 PMFeroze Daud Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    What do you mean by "sending multiple requests"? Is the same process instance sending multiple requests, or are you recreating processes that send requests?

    What library are you using? WCF? WSE? System.Net?

    feroze.

    feroze
    --
    My blog
    Instruction on how to create a tracelog with your System.Net application
  • Tuesday, November 03, 2009 8:32 PMCBannon Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Figured out the problem is that I was requesting too many connections and it was eating up the ports.  The only change could be made to a registry key but that could have ill effects on other processes.

    Best solution is to just create and use a single TCP port to pass all the requests through instead of allowing the system to use up all available ports.

    CBannon
    • Marked As Answer byCBannon Tuesday, November 03, 2009 8:32 PM
    •