Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I hope someone can follow all this because I am having a problem with it all, so please feel free up insert correct terminology and correct concepts I have got wrong. Ok - here goes:

I have an application that sends 'jobs' to a linux machine via an apache web service. It's pretty slow so I took some time to speed it up but I'm now hitting the wall with regards to the linux machines free ports. There are <30k ports available with a keep_alive time of 2 hours. I am looking onto changing this to increase available ports and reducing the keep_alive time but there are other machines that require the keep alive time to be longer than I had hoped. not quite 2 hours but long enough that I may well hit the wall in the future.

The question at it's core is 'What do I do to solve this?', but hopefully I have broken that down with these two questions:
1: Is there a way keep using a single port for each subsequent request?. Or...
2: Is there a way that I can tell the linux machine to close the port when I'm done with it?

I have limited access to the linux machine and limited scope to change it's behavour, but it is do-able if that would be the only (or very much best) solution.

I don't really know what search terms to look for so I haven't been able to find much in the way of online articles so any help there would be very much appreciated.

Thanks
G

PS: I spoke to another techie here and he says I should mention that the webservice is defined in a wsdl that specifies a port:

XML
  <wsdl:binding name="JobservBinding" type="tns:JobservPort">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
    <wsdl:operation name="addxec">
<!--etc...--!>


But this again confuses me :?


PS exact error
"Only one usage of each socket address (protocol/network address/port)\r\nis normally permitted 10.<ip of="" the="" linux="" server="">:80"
Posted
Updated 29-Apr-13 2:09am
v3

1 solution

You seem to have a design flaw here. Do you have 30+K active connections that must remain active?

If you just connect, send something and disconnect, but the server keeps the socket opened, this means that you close client socket in the wrong way. You need to perform correct shutdown of the TCP socket before disconnection. If you forcefully close the socket without shutting it down, the server has no way to know that the socket was closed, and keeps his side of the socket opened.
 
Share this answer
 
v2
Comments
Andy Lanng 29-Apr-13 6:36am    
sure, but how :S
at the moment the webservice is specified in c# via a wsdl file. Should I hand-write something that allows me to handle the ports?
PS: more info. added to question.
PPS. no the connections do not need to remain active. I am setting up a test linux machine vm clone so that I can see where this error message is actually coming from; the linux server of windows client
Eugene Mayeski 29-Apr-13 6:43am    
Unfortunately I don't know how exactly the web service is accessed, so I can't recommend anything besides using some other web service client to establish connection and transfer data.
Andy Lanng 8-May-13 6:21am    
Oh, thanks for getting back. I ended up adding a new perl service to take in a csv of parameters.
The error was a TCP/IP Exhaustion Error. The ports are being open / closed correctly but Windows can't cope with such a high volume throughput :S

thanks tho ^_^

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900