fiddler 删除了传出 http 连接限制?

发布于 2024-12-01 19:11:17 字数 517 浏览 1 评论 0原文

我有一个 .net 客户端应用程序,可以打开长时间运行的异步 http 连接。

我有两台服务器:一台用于开发,另一台用于登台。 在应用程序中,我可以创建任意数量的这些连接。并且我能够成功打开 与服务器的 50 个连接。为了好玩,我尝试启动其中 4 个应用程序,全部打开 50 个连接,并且在开发环境中向服务器打开了 200 个连接,我可以通过 netstat 观察到。

当我尝试对登台服务器执行相同操作时,我最多可能获得 1 或 2 个连接,总共 - 无论我运行的应用程序有多少个实例。然后我启动 fiddler,并将其配置为系统代理。然后我运行我的应用程序,我看到它们都已连接。我查看 netstat 输出,确实看到了所有连接。

开发服务器和登台服务器之间的区别如下:登台服务器位于公司代理后面。所以 netstat 向我显示我有到 fiddler 的连接和到代理的连接。

这是我的问题。 fiddler 如何让我拥有 50 个连接,而没有它,我只能获得 1 或 2 个连接?我的客户端代码中需要配置什么吗?

谢吉浩

I have a .net client app that opens a long running asynchronous http connection.

I have two servers: one in dev and the other in staging.
In the app, I can create any number of these connections. And I am successfully able to open
50 connections to the server. For kicks, I tried starting 4 of these apps all opening 50 connections, and I have 200 connections open to the server in dev environment, which I can observe via netstat.

When I try to do the same against staging server, I get perhaps 1 or 2 connections at most, total - doesn't matter how many instances of my app I'm running. Then I start up fiddler, and have it configured as system proxy. I then run my app and I see all of them connected. I look at netstat output and I indeed see all of the connections.

Here's a difference between the dev server and the staging server: staging server is behind a corporate proxy. So netstat shows me that I have connection going to fiddler and a connection going to the proxy.

Here's my question. How is fiddler letting me have 50 connections when without it, I can only get 1 or 2 connections? Is there something I need to configure in my client code?

Thanks

Jiho

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

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

发布评论

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

评论(2

风吹短裙飘 2024-12-08 19:11:17

原来这与代理相关。 Fiddler 具有代理信息,能够进行登台,但我自己的 .net 应用程序没有使用代理,因此“挂起”。
一旦我使用代理配置了我的请求,它们就能够毫无问题地访问临时服务器。

This turned out to be a proxy related. Fiddler having proxy information, were able to get out to staging but my own .net app did not use proxy and thus "hanging".
Once I configured my requests with proxy, they were able to hit the staging servers no problem.

一百个冬季 2024-12-08 19:11:17

我刚刚遇到了同样的问题。为了解决这个问题,我在应用程序代码(控制台应用程序)中设置了 ServicePointManager.DefaultConnectionLimit = 50;。请注意,此设置是进程范围的。在此设置之前,我只有 2 个打开的连接(我认为这是默认设置)

I just ran into this same problem. To fix it, I set ServicePointManager.DefaultConnectionLimit = 50; in my application code (console app). Note that this setting is process-wide. Prior to this setting, I had only 2 open connections (which I believe is the default)

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