AJP Proxy Error mod_ajp timeout

715 views
Skip to first unread message

Craig61877

unread,
May 25, 2011, 2:36:12 PM5/25/11
to Railo
I am having an issue where a server time out on a connection and takes
itself out of rotation, and needs to be restarted. Below is the error
and the apache config. The error happens many times, and then the
server hangs.

I looked for ajp connections on the server by doing "netstat -p | grep
9008" and saw aver 100 "WAITING" threads. It seems like connections
are being made, and not recycled?

Any insight or advice is welcome!

------
Error:
------

[Wed May 18 18:11:34 2011] [error] (70007)The timeout specified has
expired: ajp_ilink_receive() can't receive header
[Wed May 18 18:11:34 2011] [error] ajp_read_header: ajp_ilink_receive
failed
[Wed May 18 18:11:34 2011] [error] (120006)APR does not understand
this error code: proxy: read response failed from (null) (*)

--------------
Apache config:
--------------

<VirtualHost *:80>
DocumentRoot /tomcat/webapps/ROOT
ServerName localhost
<Location images>
RewriteEngine off
</Location>
Alias /temp "/tomcat/webapps/temp"
Alias /asset "/tomcat/webapps/asset"
<Location / >
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/$1 !-f
RewriteRule ^([^\.]*\.[a-zA-Z]{3,4})$ ajp://localhost:8009/index.cfm/$1$2
[P]
</Location>
<Location /asset >
RewriteEngine on
RewriteCond $1 !-f
RewriteRule ^([^\.]*\.[a-zA-Z]{3,4})$ ajp://localhost:8009/asset.cfm/$1$2
[P]
</Location>
</VirtualHost>

whostheJBoss

unread,
May 25, 2011, 8:48:13 PM5/25/11
to ra...@googlegroups.com
Does this happen only sometimes? Such as when you are first initializing an application? Or maybe also when a large query or process is running?

Instead of Rewrite, you could use ProxyPass, which allows you to pass a timeout, or even the Proxy Balancer with 1 backend and set the timeout on that. You could also change the timeout for Tomcat. The issue is that Tomcat isn't responding in time. There's an upstream timeout setting in Tomcat.

Also, connections over AJP have to be closed by the client, so you might be running into your max connections if 100 are open.

Let me know if you can't figure out the specifics.
Reply all
Reply to author
Forward
0 new messages