如何使用 TcpChannel 配置对远程服务器的并发请求限制

发布于 2024-07-12 04:09:49 字数 610 浏览 6 评论 0原文

我有一个带有底层 TcpChannel 的标准远程处理服务器:

    IDictionary props = new Hashtable();
    props["port"] = portnumber;
    TcpChannel channel = new TcpChannel(props, null, provider);

    ChannelServices.RegisterChannel(channel, false);
    string url = string.Format("AgentHost", portnumber);
    RemotingConfiguration.RegisterWellKnownServiceType(
        typeof(RemotingAgentHostEndPoint),
        url,
        WellKnownObjectMode.SingleCall);

它工作正常,但是当并行调用达到 200 个时,客户端会收到 “无法建立连接,因为目标机器主动拒绝 127.0.0.1:33333”异常。

我找不到任何地方可以超越这个限制 - 你们有人知道吗?

亲切的问候 卡斯滕·赫斯

I have a standard Remoting server with an underlying TcpChannel:

    IDictionary props = new Hashtable();
    props["port"] = portnumber;
    TcpChannel channel = new TcpChannel(props, null, provider);

    ChannelServices.RegisterChannel(channel, false);
    string url = string.Format("AgentHost", portnumber);
    RemotingConfiguration.RegisterWellKnownServiceType(
        typeof(RemotingAgentHostEndPoint),
        url,
        WellKnownObjectMode.SingleCall);

It works fine but when at 200 parallel calls the clients receive a
"No connection could be made because the target machine actively refused it 127.0.0.1:33333" exception.

I cannot find anywhere to override this limit - do any of you have a clue ?

Kind regards
Carsten Hess

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

话少情深 2024-07-19 04:09:49

Windows 对并发半开 TCP 连接的最大数量有限制。 这个限制在不同的版本和配置中有所不同,但都在这里。 例如,Google 查找 tcpip.sys 问题 - 您会发现各种配置选项来覆盖此问题。

Windows has a limit for maximum number of concurrent half-opened tcp connections. This limit vary in different versions and configurations, but it is here. Google for tcpip.sys troubles for example - you will find various configuration options to override this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文