Bug 15629 - http keep-alive connection creates new socket for each request
Summary: http keep-alive connection creates new socket for each request
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-10-23 14:26 UTC by Chris
Modified: 2014-07-30 20:01 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Chris 2013-10-23 14:26:55 UTC
Http clients correctly send the Connection: keep-alive header, but never reuse the underlying tcp connection, instead creating a new one for each request.

Test code is here:
https://gist.github.com/chrisochs/7113668


Ngrep session showing client origination port changing on each request, even though both sides say they are using keep-alive:
https://gist.github.com/chrisochs/7113886

You can also see the effects by just looking at all of the tcp connections left in TIME_WAIT after running the client.

I'm seeing this on ubuntu 12 and 13, with mono 3.2.3 and master built from github.

Chris
Comment 1 Zoltan Varga 2013-10-24 05:52:28 UTC
-> class libs.
Comment 2 Martin Baulig 2014-07-29 07:13:51 UTC
old