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 2007/05/18 21:44:06 UTC

DO NOT REPLY [Bug 42453] New: - Long (over 5 minutes) request causes error 10060 from mod_proxy_ajp

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=42453>.
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=42453

           Summary: Long (over 5 minutes) request causes error 10060 from
                    mod_proxy_ajp
           Product: Apache httpd-2
           Version: 2.2.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: tschafer@hotmail.com


A request which takes longer than 5 minutes for tomcat to return a response
causes apache to return a 503 error to client while logging the following error:
[Fri May 18 11:32:36 2007] [error] (OS 10060)A connection attempt failed because
the connected party did not properly respond after a period
 of time, or established connection failed because connected host has failed to
respond.  : ajp_ilink_receive() can't receive header
[Fri May 18 11:32:36 2007] [error] ajp_read_header: ajp_ilink_receive failed
[Fri May 18 11:32:36 2007] [error] (120006)APR does not understand this error
code: proxy: send body failed to (null) (*)

apache mod_proxy_ajp is configured to proxy requests to tomcat
with this addition to httpd.conf:
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /webapp ajp://localhost/webapp


apache documentation implies there is no timeout for proxy requests.
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

If timeout is hardcoded, then a request to enhance with a conf option
If timeout is adjustable, then a request to update documentation with mention of
default timeout and conf option for changing

Very enthused about upgrading from apache 2.0/mod_jk2 to apache 2.2/mod_proxy_ajp
This is the only known blocker to going live.

Great work integrating AJP into apache httpd. Much easier to use :)

-- 
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 42453] - Long (over 5 minutes) request causes error 10060 from mod_proxy_ajp

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=42453>.
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=42453


rpluem@apache.org changed:

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




------- Additional Comments From rpluem@apache.org  2007-08-22 12:28 -------
Try adding an explicit timeout parameter to your BalancerMembers. ProxyTimeout
application is broken in 2.2.4 but will be fixed in the next 2.2.x release.

-- 
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 42453] - Long (over 5 minutes) request causes error 10060 from mod_proxy_ajp

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=42453>.
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=42453





------- Additional Comments From tschafer@hotmail.com  2008-02-06 18:38 -------
Revisiting this problem with an installation from
apache_2.2.8-win32-x86-openssl-0.9.8g.msi

I've found that using:
ProxyPass /webapp ajp://localhost/webapp timeout=1800
Doesn't have the desired effect.

However adding:
Timeout 1800
to httpd.conf will result in allowing a longer running tomcat request to
successfully return it's result, regardless of whether timeout=1800 was added to
the ProxyPass

Is there any way to configure apache to allow a ProxyPass to run longer than the
standard Timeout without overriding it for the entire URL space?


-- 
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 42453] - Long (over 5 minutes) request causes error 10060 from mod_proxy_ajp

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=42453>.
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=42453





------- Additional Comments From rpluem@apache.org  2007-08-23 09:13 -------
(In reply to comment #4)
> Thanks for the quick response. Here's the new config, I'll try now:
> 
> <Location /b2b-instance0>
>    ProxyPass balancer://b2binstance0 stickysession=JSESSIONID
> lbmethod=byrequests timeout=60

The timeout parameter for a balancer has a different meaning that you might not
desire (http://httpd.apache.org/docs/2.2/en/mod/mod_proxy.html#proxypass). So I
would omit it here.



-- 
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 42453] - Long (over 5 minutes) request causes error 10060 from mod_proxy_ajp

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=42453>.
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=42453





------- Additional Comments From rpluem@apache.org  2008-02-07 12:29 -------
(In reply to comment #9)
> Revisiting this problem with an installation from
> apache_2.2.8-win32-x86-openssl-0.9.8g.msi
> 
> I've found that using:
> ProxyPass /webapp ajp://localhost/webapp timeout=1800
> Doesn't have the desired effect.
> 

I cannot reproduce this. It works and has the desired effect. It is likely that
the worker ajp://localhost/webapp is not used. Do you have any other ProxyPass
settings, <proxy> blocks or rewrite rules in your configuration?

-- 
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 42453] - Long (over 5 minutes) request causes error 10060 from mod_proxy_ajp

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=42453>.
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=42453





------- Additional Comments From mail@dekies.de  2007-09-04 01:13 -------
Ok seems to be better than before...now only one Apache had problems to connect
to the tomcats. The other one was fine.

After a graceful restart, found this many times in error log:
(9)Bad file number: apr_socket_accept: (client socket)

-- 
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 42453] - Long (over 5 minutes) request causes error 10060 from mod_proxy_ajp

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=42453>.
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=42453


mail@dekies.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mail@dekies.de




------- Additional Comments From mail@dekies.de  2007-08-22 11:32 -------
I have similar problems with my application. If there is a high request count,
the client will get a 503 error. I have two apaches (accessed by round robin
dns) and two tomcats. So if one of them fails, the other one should handle the
requests. Unfortunately this doesn't work, both fail at the same time :-(

The apache error log shows the following:
[error] ajp_read_header: ajp_ilink_receive failed
[error] (120006)APR does not understand this error code: proxy: send body failed
to (null) (x.x.x.x)
[error] (70007)The timeout specified has expired: ajp_ilink_receive() can't
receive header

The tomcat logs contain broken pipe errors and IOExceptions, but I found in
#38489 that this is the expected behaviour.
org.apache.jk.core.MsgContext action
WARNING: Error sending end packet
java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:531)
       
Aug 17, 2007 1:12:44 PM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2

 java.io.IOException
        at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:190)
        at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:164)
        at org.apache.coyote.Request.doRead(Request.java:418)
        at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:284
)
        at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:371)
        at org.apache.catalina.connector.InputBuffer.readByte(InputBuffer.java:293)
        at
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:
104)


The issue #36495 deals with similar problems. So I tried to set MaxClients to
512 and keepalive=On (without success). Tomcat maxThreads is 1024.

-- start of my config --
ServerLimit 1024
MaxClients 1024
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 20
<IfModule mod_proxy.c>
  ProxyRequests Off
  ProxyTimeout 60
  <Location /instance0>
     ProxyPass balancer://instance0 stickysession=JSESSIONID
lbmethod=byrequests
  </Location>
  
  <Proxy balancer://instance0>
     BalancerMember ajp://[host1-ip]:20009/instance0 route=node1 min=2 smax=5
     BalancerMember ajp://[host2-ip]:20009/instance0 route=node2 min=2 smax=5
  </Proxy>

  <Location /instance1>
      ProxyPass balancer://b2binstance1 stickysession=JSESSIONID lbmethod=byrequests
  </Location>

  <Proxy balancer://instance1>
      BalancerMember ajp://[host1-ip]:21009/instance1 route=node1 min=2 smax=5
      BalancerMember ajp://[host2-ip]:21009/instance1 route=node2 min=2 smax=5
  </Proxy>
</IfModule>
-- config end --

It's exasperating...hope that somebody can give me a hint.

environment: Apache 2.2.4, SunOS 5.8, Tomcat 5.5.20, JDK 1.5


-- 
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 42453] - Long (over 5 minutes) request causes error 10060 from mod_proxy_ajp

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=42453>.
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=42453





------- Additional Comments From mail@dekies.de  2007-08-23 04:51 -------
Thanks for the quick response. Here's the new config, I'll try now:

<Location /b2b-instance0>
   ProxyPass balancer://b2binstance0 stickysession=JSESSIONID
lbmethod=byrequests timeout=60
</Location>

<Proxy balancer://b2binstance0>
   BalancerMember ajp://212.6.120.198:20009/b2b-instance0 route=node1 min=2
smax=5 timeout=60
   BalancerMember ajp://212.6.120.199:20009/b2b-instance0 route=node2 min=2
smax=5 timeout=60
</Proxy>

-- 
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 42453] - Long (over 5 minutes) request causes error 10060 from mod_proxy_ajp

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=42453>.
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=42453





------- Additional Comments From mail@dekies.de  2007-12-31 03:32 -------
After months of testing I switched to http to avoid the problem. It's a pity 
that mod_proxy_ajp doesn't work as stable as mod_jk before.

-- 
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 42453] - Long (over 5 minutes) request causes error 10060 from mod_proxy_ajp

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=42453>.
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=42453





------- Additional Comments From rpluem@apache.org  2007-05-18 14:34 -------
1. Timeout is adjustable (=> Timeout parameter at
http://httpd.apache.org/docs/2.2/en/mod/mod_proxy.html#proxypass,
ProxyPass /webapp ajp://localhost/webapp timeout=1800 )
2. It is documented, but the documentation might be misleading (=>
http://httpd.apache.org/docs/2.2/en/mod/mod_proxy.html#proxypass)

-- 
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 42453] - Long (over 5 minutes) request causes error 10060 from mod_proxy_ajp

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=42453>.
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=42453


wrowe@apache.org changed:

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




------- Additional Comments From wrowe@apache.org  2007-12-30 23:18 -------
"(9)Bad file number: apr_socket_accept: (client socket)"

indicative of something bogus in the socket stack, such as the host of various
'web filtering' products that weren't completely implemented for the ws2api.

Please confirm that a clean machine (no extra network drivers) does not have
this issue; in the interim, closing as a config/socket stack mistake.


-- 
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