You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/02/10 04:36:10 UTC

DO NOT REPLY [Bug 38602] New: - Keep Alive not workwing with mod_proxy (New socket created for every request proxied)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38602

           Summary: Keep Alive not workwing with mod_proxy (New socket
                    created for every request proxied)
           Product: Apache httpd-2
           Version: 2.2.0
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: jean.dagenais@integral.com


We are testing Apache 2.2 before migrating to this new release, and we found 
out that Apache does not keep sockets open with or other server (JBoss 3.2).

The same configuration is working fine on Apache 2.0.55.

We tried with both worker and prefork MPM, and this is the same behavior.

Apache is runing on Red Hat AS 4.0, Update2, 64 Bit, on a Dell Dual Core 1850.


The Keep-Alive connection between the IE Brower and Apache works OK, and no 
socket is created between multiple requests, but every requests sent(proxied) 
between Apache and JBoss cause a new socket to be created.

IE includes the HTTP header: Connection: Keep-Alive, but Apache does not send 
it to JBosss.

This is an example of the message received from IE, and then sent to JBOSS

HTTP Request #1 IE Browser -> Apache

Referer: 
http://mvperf21/application/company/navigation/fx/app/applicationStatusBar.jsp
If-Modified-Since: Wed, 01 Jan 2003 18:23:51 GMT
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 
1.1.4322)
Host: mvperf21
Connection: Keep-Alive           *************Keep Alive Header **********
Cookie: JSESSIONID=83A9AE074F3F79CF0F7D24D88EE02167; OrganizationId=AA5000; 
uid=KsXw/VpMpxQPpqeqxomCRnH515Hx9LID9MpiUAvkw9c=; 
__JPW_SID__=83A9AE074F3F79CF0F7D24D88EE02167


HTTP/1.1 200 OK
Date: Fri, 10 Feb 2006 02:31:45 GMT
Cache-Control: no-cache
Pragma: No-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/xml;charset=ISO-8859-1
Content-Length: 54

<OK ts="1139538705730" pt="101">
</OK>




HTTP Request #2 Apache -> JBoss (No Keep-Aliver HTTP Header ????)


GET /proxy/company/proxy/u.jsp?
diagnum=220&userid=82955&count=20&wait=100&priority=1&ackIdList=&latency=176.49
542718129723&realLatency=230&MsgInterval=331&MsgProcTime=70&lastMsgCount=0&QTPr
ocTime=20&IRProcTime=10&sts=200 HTTP/1.1
Host: 198.252.177.19:8080
Accept: */*
Accept-Language: en-us
Referer: 
http://mvperf21/application/company/navigation/fx/app/applicationStatusBar.jsp
If-Modified-Since: Wed, 01 Jan 2003 18:23:51 GMT
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 
1.1.4322)
Cookie: JSESSIONID=83A9AE074F3F79CF0F7D24D88EE02167; OrganizationId=AA5000; 
uid=KsXw/VpMpxQPpqeqxomCRnH515Hx9LID9MpiUAvkw9c=; 
__JPW_SID__=83A9AE074F3F79CF0F7D24D88EE02167
Max-Forwards: 10
X-Forwarded-For: 198.252.177.123
X-Forwarded-Host: mvperf21
X-Forwarded-Server: mvperf21.company.com

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: No-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/xml;charset=ISO-8859-1
Content-Length: 54
Date: Fri, 10 Feb 2006 02:31:45 GMT



This is the content of the httpd-vhosts.conf


<VirtualHost 198.252.177.38:80>
ServerAdmin admin@company.com
DocumentRoot "/company/opt/apache2/htdocs/"
ServerName mvperf21.integral.com:80
ErrorLog logs/error_log

Timeout 300
KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 100

ProxyRequests Off
	
ProxyPass        /proxy/ http://198.252.177.19:8080/proxy/ smax=5 max=20 
ttl=120 retry=300
ProxyPassReverse /proxy/ http://198.252.177.19:8080/proxy/      
	
</VirtualHost>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38602] - Keep Alive not workwing with mod_proxy (New socket created for every request proxied)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38602


rpluem@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yneko@yamamaya.com




------- Additional Comments From rpluem@apache.org  2006-04-10 20:18 -------
*** Bug 39258 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38602] - Keep Alive not workwing with mod_proxy (New socket created for every request proxied)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38602


rpluem@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From rpluem@apache.org  2006-03-07 20:35 -------
Proposed for backport as r383321 (http://svn.apache.org/viewcvs?rev=383321&view=rev)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38602] - Keep Alive not workwing with mod_proxy (New socket created for every request proxied)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38602





------- Additional Comments From jean.dagenais@integral.com  2006-02-13 19:15 -------
I did a trace with Ethereal, and the socket connection between IE and Apache 
is kept open, but a new socket is used between Apache and JBoss for each 
exchange.

IE Is running on 198.252.177.123
Apache is running on 198.252.177.38
JBOss is running on 198.252.177.19

No.     Time        Source                Destination           Protocol Info
     16 0.250856    198.252.177.123       198.252.177.38        HTTP     
GET /jmsproxy/company/jmsproxy/u.jsp?diagnum=221
     17 0.000203    198.252.177.38        198.252.177.19        TCP      11970 
> 8080 [SYN] Seq=0 Ack=0 Win=5840 Len=0 MSS=1460 TSV=8098330 TSER=0 WS=9
     18 0.000053    198.252.177.19        198.252.177.38        TCP      8080 
> 11970 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=30418315 
TSER=8098330 WS=9
     19 0.000022    198.252.177.38        198.252.177.19        TCP      11970 
> 8080 [ACK] Seq=1 Ack=1 Win=6144 Len=0 TSV=8098330 TSER=30418315
     20 0.000066    198.252.177.38        198.252.177.19        HTTP     
GET /jmsproxy/company/jmsproxy/u.jsp?diagnum=221
     21 0.000156    198.252.177.19        198.252.177.38        TCP      8080 
> 11970 [ACK] Seq=1 Ack=858 Win=7680 Len=0 TSV=30418316 TSER=8098330
     22 0.102066    198.252.177.19        198.252.177.38        HTTP     
HTTP/1.1 200 OK
     23 0.000011    198.252.177.38        198.252.177.19        TCP      11970 
> 8080 [ACK] Seq=858 Ack=257 Win=7168 Len=0 TSV=8098432 TSER=30418418
     24 0.000086    198.252.177.38        198.252.177.19        TCP      11970 
> 8080 [FIN, ACK] Seq=858 Ack=257 Win=7168 Len=0 TSV=8098432 TSER=30418418
     25 0.000041    198.252.177.38        198.252.177.123       HTTP     
HTTP/1.1 200 OK
     26 0.000114    198.252.177.19        198.252.177.38        TCP      8080 
> 11970 [FIN, ACK] Seq=257 Ack=859 Win=7680 Len=0 TSV=30418418 TSER=8098432
     27 0.000010    198.252.177.38        198.252.177.19        TCP      11970 
> 8080 [ACK] Seq=859 Ack=258 Win=7168 Len=0 TSV=8098432 TSER=30418418
     28 0.217864    198.252.177.123       198.252.177.38        TCP      1578 
> http [ACK] Seq=1493 Ack=512 Win=16656 Len=0


     29 0.091197    198.252.177.123       198.252.177.38        HTTP     
GET /jmsproxy/company/jmsproxy/u.jsp?diagnum=222
     30 0.000145    198.252.177.38        198.252.177.19        TCP      11971 
> 8080 [SYN] Seq=0 Ack=0 Win=5840 Len=0 MSS=1460 TSV=8098741 TSER=0 WS=9
     31 0.000107    198.252.177.19        198.252.177.38        TCP      8080 
> 11971 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=30418727 
TSER=8098741 WS=9
     32 0.000014    198.252.177.38        198.252.177.19        TCP      11971 
> 8080 [ACK] Seq=1 Ack=1 Win=6144 Len=0 TSV=8098742 TSER=30418727
     33 0.000064    198.252.177.38        198.252.177.19        HTTP     
GET /jmsproxy/company/jmsproxy/u.jsp?diagnum=222
     34 0.000170    198.252.177.19        198.252.177.38        TCP      8080 
> 11971 [ACK] Seq=1 Ack=857 Win=7680 Len=0 TSV=30418728 TSER=8098742
     35 0.102191    198.252.177.19        198.252.177.38        HTTP     
HTTP/1.1 200 OK
     36 0.000009    198.252.177.38        198.252.177.19        TCP      11971 
> 8080 [ACK] Seq=857 Ack=257 Win=7168 Len=0 TSV=8098844 TSER=30418830
     37 0.000079    198.252.177.38        198.252.177.19        TCP      11971 
> 8080 [FIN, ACK] Seq=857 Ack=257 Win=7168 Len=0 TSV=8098844 TSER=30418830
     38 0.000041    198.252.177.38        198.252.177.123       HTTP     
HTTP/1.1 200 OK
     39 0.000122    198.252.177.19        198.252.177.38        TCP      8080 
> 11971 [FIN, ACK] Seq=257 Ack=858 Win=7680 Len=0 TSV=30418830 TSER=8098844
     40 0.000009    198.252.177.38        198.252.177.19        TCP      11971 
> 8080 [ACK] Seq=858 Ack=258 Win=7168 Len=0 TSV=8098844 TSER=30418830


I am also trying to used pooled connection to the backend, 

e.g. ProxyPass /example http://backend.example.com min=20 max=50 

and I was wondering why I do not see these 20 connections created when I start 
the Apache server? Does it require a Proxy message do be received before 
creating these connections?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38602] - Keep Alive not workwing with mod_proxy (New socket created for every request proxied)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38602





------- Additional Comments From rpluem@apache.org  2006-04-11 22:14 -------
*** Bug 39258 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38602] - Keep Alive not workwing with mod_proxy (New socket created for every request proxied)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38602





------- Additional Comments From doug.dixon@gmail.com  2006-02-12 04:40 -------
In HTTP/1.1 the _default_ behaviour is to use persistent connections. To quote
the spec:

"A significant difference between HTTP/1.1 and earlier versions of HTTP is that
persistent connections are the default behavior of any HTTP connection. That is,
unless otherwise indicated, the client SHOULD assume that the server will
maintain a persistent connection, even after error responses from the server."

So in this case IE is sending a Keep-Alive header to try to get persistent
connections even if it's talking to an HTTP/1.0 server that supports them. It's
not needed for HTTP/1.1 servers.

Anyway, it looks to me like you probably are getting persistent connections
between Apache and JBoss, which I infer from the HTTP/1.1 in the request and
response headers and more specifically from the lack of a "Connection: close"
header from JBoss. ("Connection: close" is how an HTTP/1.1 server says it wants
to close the TCP connection)

This is not conclusive, though. The Ultimate Test, of course - and what I
recommend - is to look at the TCP conversation between your hosts (e.g. with
Ethereal or Tethereal) to see whether TCP connections really are being closed
after each request.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38602] - Keep Alive not workwing with mod_proxy (New socket created for every request proxied)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38602


rpluem@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From rpluem@apache.org  2006-02-15 21:36 -------
A patch against trunk has been created (r378032,
http://svn.apache.org/viewcvs?rev=378032&view=rev). Could you please give it a try?
Please keep in mind that there is a further keepalive bug with mod_proxy on the
client side of the connection (#38524).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38602] - Keep Alive not workwing with mod_proxy (New socket created for every request proxied)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38602





------- Additional Comments From jean.dagenais@integral.com  2006-03-07 14:57 -------
I verified the patch, and it solve the issues with Keep Alive connections.

The connections are kept open, and the Keep-Alive header is passed to the 
JBoss server.

Thanks a lot!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38602] - Keep Alive not workwing with mod_proxy (New socket created for every request proxied)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38602


asmorgrav@yahoo.no changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yair.lenga@citi.com




------- Additional Comments From asmorgrav@yahoo.no  2008-01-09 00:08 -------
*** Bug 43238 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org