[Mono-list] HttpWebRequest concurrency issues
hyber at hyber.dk
Sun Dec 23 15:00:22 UTC 2012
Den 19-12-2012 10:26, Kriss skrev:
> Ian, Esben,
> How do you observe the problem, ie how do you observe that the socket is
> closed or that the webrequest used another context/session/object each time?
> I may be facing the same issue as yours, trying to understand why an
> application relying essentially on webrequest (and httplistener) runs fine
> in Windows but is much slower in Mono/Linux.
I use wireshark to look at the traffic. From there I can see if the
If you use a http filter to find the request that you have done in my
case it was:
http.request.uri contains "schur-beta"
Then I right-click on the request and select the "follow TCP stream". In
my case I have multiple requests going to the same server, so I would
suspect that it would use the same session. But when I follow the TCP
stream, I can see that mono does a 3-way handshake sends one request,
gets the response and then closes the connection.
If it used persistent connection I would see multiple requests/responses
in between the 3-way "open" and "close" hand-shake.
Or you can simply look at the delta time and the source port of each
request. Since the delta time is less than 1 sec. and the source port
changes all the time, it means that we open a new session every time and
close it again.
See this screenshot:
I have a task to look into this later with mono-3.0, but its most likely
not going to happen before mid-end Q1 2013.
I would be interested in if anyone else have experience to share ;-)
More information about the Mono-list