[Mono-list] HttpWebRequest concurrency issues

Esben Laursen hyber at hyber.dk
Mon Dec 17 21:16:43 UTC 2012


Den 14-12-2012 15:17, Daniel Lo Nigro skrev:
> You should try the same code in Mono 3.0.x to see if the bug has been 
> fixed.
>
> You can try out the Parallel Mono packages for Debian, they should 
> work on Ubuntu: 
> http://inorton.wordpress.com/pmono-parallel-mono-debian-pacakges/
> Otherwise, it's pretty easy to build from source. Feel free to ask if 
> you don't know how to do this :)
>
>
> On Sat, Dec 15, 2012 at 12:44 AM, Dave Curylo <curylod at asme.org 
> <mailto:curylod at asme.org>> wrote:
>
>     I'm running mono 2.10.8.1 on Ubuntu 12.04.
>
>     I'm sending multiple HttpWebRequests to the same server and
>     getting a timeout error, and also seeing that only one connection
>     is made to the server at a time.  Under Windows, the same code
>     sends multiple concurrent web requests, so this seems to be
>     specific to mono.  I've attempted setting the connection limits by
>     increasing System.Net
>     <http://System.Net>.ServicePointManager.DefaultConnectionLimit and
>     also by configuration, such as
>
>     |<configuration>  
>       <system.net  <http://system.net>>  
>        <connectionManagement>  
>         <add  address="*"  maxconnection="100"  />  
>        </connectionManagement>  
>       </system.net  <http://system.net>>  
>     </configuration>|
>
>     Neither seem to have any effect.  I suspect this is related to
>     this bug:
>
>     https://bugzilla.xamarin.com/show_bug.cgi?id=7002
>
>     How do I tell if the version of Mono I am running contains this
>     fix?  If it doesn't, what is the best way to obtain such a fix?
>      Are they distributed through Ubuntu repositories or do I need to
>     build from source?
>

I have seen a problem where mono would close a connection after the http 
request/response was done, it didnt break anything it just initiated a 
new session on every request even though it should use the same (it 
works on Windows). I have just recently upgraded on of my "test" 
machines to 3.0.1 (running CentOS, compiled from source)..

As far as I can tell, its the same problem on 2.6.x and 3.0.1. So if you 
find otherwise please speak up, as I would be really interested...

Now this being said, I have not yet done much work in this area of the 
code, the reason I upgraded was I was hitting a memory leak in the 2.6.x 
code (as far as I can tell)..

I usually have 10 threads that do HTTP POST to send some text back to a 
server. I would like for it to use the same session again and again (or 
10 sessions) in this case, but it closes after every POST (or GET for 
that matter)

Cheers

Esben



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20121217/341db1fc/attachment-0001.html>


More information about the Mono-list mailing list