HttpWebResponse won't scale for concurrent outbound requests

前端 未结 3 2107
慢半拍i
慢半拍i 2021-02-04 09:59

I have an ASP.NET 3.5 server application written in C#. It makes outbound requests to a REST API using HttpWebRequest and HttpWebResponse.

I have setup a test applicatio

3条回答
  •  温柔的废话
    2021-02-04 10:24

    If @jake-moshenko is right about ServicePointManager.DefaultConnectionLimit not having any effect if changed in Mono, please file this as a bug in http://bugzilla.xamarin.com/.

    However I would try some things before discarding this completely as a Mono issue:

    1. Try using the SGen garbage collector instead of the old boehm one, by passing --gc=sgen as a flag to mono.
    2. If the above doesn't help, upgrade to Mono 3.2 (which BTW defaults to SGEN GC too), because there has been a lot of fixes since you asked the question.
    3. If the above doesn't help, build your own Mono (master branch), as this important pull request about threading has been merged recently.
    4. If the above doesn't help, build your own Mono with this pull request added. If it fixes your problem, please add a "+1" to the pull request. It might be a fix for bug 7055.

提交回复
热议问题