0

We’re using JBoss 7.1.3.Final with Apache 2.2.31. We’re connecting from Apache to JBoss through an AJP connection. We are noticing 504 GATEWAY_TIMEOUT errors after 60 seconds when requesting a particular page that does a lot of processing. We have set this parameter in our /etc/httpd/conf/httpd.conf file

Timeout 300

However, even after restarting Apache, we are still seeing the timeouts. What other settings do I need to examine in order to increase the timeout? There does not seem to be any relevant connection timeout settings within our JBoss standalone.xml configuration file.

When I connect to JBoss directly (by-passing Apache), I notice I don’t see these timeout errors.

Dave
  • 155
  • 1
  • 5
  • 17
  • 2
    Possible duplicate of [Increasing timeout for mod\_proxy\_ajp connections](http://serverfault.com/questions/10525/increasing-timeout-for-mod-proxy-ajp-connections) –  Nov 17 '16 at 22:03
  • IMHO you should investigate why it takes so much first, if you're hosting a website 60 seconds in unacceptable, you'll DOS yourself this way, users get bored after ~15seconds waiting and click again, so you have an amplification of requests – Fredi Nov 18 '16 at 13:40
  • @Fredi -- this is not a user facing page. This is an admin page and the three people that will use it all udnerstand why it takes so long to generate the ouptut. – Dave Nov 18 '16 at 14:47
  • @yoonix, I changed a line in my ajx_proxy pass file to "ProxyPass /mydir/ ajp://localhost:8009/mydir/ connectiontimeout=300 timeout=300" but I'm still getting a timeout after 60 seconds. – Dave Nov 18 '16 at 15:32
  • In which interface is listening jboss? which port? It's the same interface that your apache ajp conecction? Is Jboss listening in all interfaces? Maybe the iptables works wrong? – Pablo Luna Nov 18 '16 at 09:47
  • How are the iptables related to the timeout settings? If the iptables/ports were wrong, I wouldn't be able to make any connections at all to JBoss, but everything is running fine -- the only problem is when a request takes a long time, the data does not get served back to the client. – Dave Nov 18 '16 at 15:34
  • What kind of request are you reverse proxying to JBOSS? GET/POST? Maybe 60 seconds is the idle timeout you have configured for JBOSS request processing threads? – Dti Nov 22 '16 at 16:49
  • Also when a request times out, is it logged in botrh the apache access logs and the jboss access logs? – Dti Nov 22 '16 at 16:51

1 Answers1

0

I suggest you to use proxy_http_module instead of proxy_ajp_module. That change has resolved the same issue I was facing.

Eric-D
  • 1