What is the reason and how to fix 503 errors with this in Apache error_log: "Broken pipe: ajp_ilink_send (): send failed"

I am having intermittent problems with a servlet running on JBoss, with Apache redirecting all requests through mod_proxy_ajp.so.

Sometimes for REST requests I get 503 errors from Apache. When this happens, Apache error_log has this in it:

[Mon Oct 12 09:10:19 2009] [error] (32)Broken pipe: ajp_ilink_send(): send failed [Mon Oct 12 09:10:19 2009] [error] (32)Broken pipe: proxy: send failed to 127.0.0.1:8009 (localhost) 

After several unsuccessful attempts, it will start working again.

I searched for some and found that I was not the only one who ran into the problem. The only solution I found was to make sure Apache started after JBoss (I restart Apache after restarting JBoss).

The strange problem with this problem is that other servlets work in this JBoss, and I have no problem there.

A servlet is a CXF JAX-RS.

Apache - 2.2.6.

+4
source share
3 answers

When using the AJP protocol, you must be very careful to make sure that both sides of the communication (i.e. Apache and Tomcat) are configured with the same parameters. This is because AJP uses persistent state connections, and both parties must have the same life expectancy for the connection.

I suggest giving the appropriate Tomcat docs a good read . You may have to change the configuration of Apache mod_proxy_ajp or the configuration of the Tomcat AJP connector, or both, to make them match. If the configurations are slightly different from each other, AJP performance can completely suck.

+1
source

I had the same problem, but I also did not find the reason. An easy solution is to reset mod_proxy_ajp in favor of mod_proxy_http if a slight decrease in performance is acceptable. It works without problems, at least for a website with a maximum speed of up to 100 folders per second.

+1
source

I found that this configuration configurator is useful in setting up AJP connections. Starting with the configuration you created and reading the relevant documentation has been instructive.

(You can specify the "apache mpm" parameter by running apachectl -l , which lists the compiled modules.)

+1
source

All Articles