Transports Quotas

Nicholas has a great post explaining the various knobs available to be tweaked at the Transport layer. He also explains the post-RC0 changes we made to connection pool settings and throttling.

For developer settings, you shouldn’t need to touch the defaults, but for live deployments you will find these knobs quite useful. Our guidance on actual tuning is currently, uhm, thin but I’ve promised Christian that I’ll remedy that after I’ve beaten the last few WCF stress bugs into submission 🙂

7 thoughts on “Transports Quotas

  1. Ramesh

    Hi,

    I am doing load testing with three different pc, I have set 10000 max connection, I have created 25 thread and each will run about 2 minutes. it was process about 4000 records, then i got the following error. I was set transport as tcp binding,HostNameCamparision mode set to Extract, with extract ip address mentioned, Let me know if i am missing something

    Here is the error i got
    The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.

    Thanks

    Ramesh

    Reply
  2. Kenny

    You probably need to update your ServiceThrottles (use ServiceThrottlingBehavior). You can also try enabling tracing at warning level to see what exceptions are getting thrown.

    Reply
  3. Kristian

    Hi Kenny,

    I use the NetNamedPipeBinding and want to increase the max number of connections from the default 10 to 100.

    But when I set the property MaxConnection on the server side to any(!) other value than 10 (even smaller), the client fails to connect with a CommunicationException: “There was an error reading from the pipe: Unrecognized error 109 (0x6d). —> System.IO.PipeException: There was an error reading from the pipe: Unrecognized error 109 (0x6d).”

    If I change the property back to 10, it work fine again.

    I don’t really understand why ServiceThrottles (which seem to be a very frequent answer to this type of question that I have seen so far on the MSDN forum and elsewhere) would help in my case, because it fails when I change the property to whatever value other than 10. It feels more like there is something bad being sent during the handshake causing this problem. The ServiceTraceViewer doesn’t help me much since I don’t really understand the meaning of the logged error (basically, with the tool, I saw the same message as in the exception that I mentioned above).

    I hope you can help me finding out what’s wrong.
    Thank you in advance,

    Kristian

    Reply
  4. Kenny

    I haven’t seen this one before. Looks like ERROR_BROKEN_PIPE, which means you’re finding the address and then having trouble connecting. Usually that would be mismatched bindings, but MaxConnections shouldn’t affect this. Are there any errors in the service’s logfile (if you enable tracing)?

    Reply
  5. Kristian

    Hi Kenny, I think I found the reason for the problem when I looked again in the trace viewer log.
    Yes there are errors in both the Service’ and the client’s logfile.
    Basically, on the service side, the message in the activity views says:

    Construct ServiceHost ‘…’
    Open ServiceHost ‘…’
    Listen at ‘net.pipe://testbrokerservice/’
    Listen at ‘net.pipe://infrastructure.discovery/BrokerService’
    Receive bytes on connection ‘net.pipe://testbrokerservice/’

    Reply
  6. Kristian

    … (here is the rest of my message that seemed to have been lost when I submitted)

    I was a bit confused why I saw two lines ‘Listen’ since I only expected that one named pipe end point is created (programmatically), but when I checked the app.config I found a configuration of a second endpoint ‘net.pipe://testbrokerservice/’, which shouldn’t be there at all (I think it was a left-over from when I created the project and added a test end point). Apparently, the client connected to the wrong end-point (which wasn’t configured right anyway) and that probably caused the sudden disconnect, with the strange exception on the client side… Thank you for asking me the “rigtht question” 🙂

    However, after I got rid of this error (I removed the wrong endpoint from the app.config), the clients connect, but the property MaxConnections, which I set programmatically right after the NetNamedPipeBinding has been constructed, doesn’t seem to have any effect on the actual limit.
    When I set the MaxConnection to 11 and create more than 10 clients, the 11’th does not connect. On the other hand, If I change the to a lower value, e.g. 3, then I can still connect 10 clients ??

    If I recall, it is not allowed to change a binding’s properties after the service host has been opened (or at least the properties remain constant after the Open), but I actually change it right after the constructor call (long before I open the host).

    Any ideas on this new problem ?

    Regards,
    Kristian

    Reply
  7. Ilan Tavor

    Hi Kristian
    Did you solve the problem of only 10 connections for net.pipe biniding?
    I am having the same problem…
    Thanks

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *