0

we are running WildFly 8.1 on our Servers. To make our application accessible on port 80 we use apache with mod_proxy. We pass every request on port 80 to WildFly. The problem is that this is very slow. For example if we access the application directly without the proxy the loading time is about 2 seconds. Through the proxy it is about 20 seconds.

We used the same proxy configuration with an other application server without any problem. Furthermore we tried it with nginx as proxy too. Same problem. Moreover we can't find any information about this in the internet. The problem was posted in the WildFly-Forum too (see https://developer.jboss.org/thread/251358). But no response until now. If anyone would have an idea what could be wrong, please let us now.

thanks in advance

EDIT: We found out that normal HTML-pages are loaded without any problems but for example java-scripts are loaded slowly. It seems that it has something todo with the file size. Small JavaScripts (for testing with 2 lines) are loaded without any problems. Others take almost a minute. We captured the network traffic. It seems that a lot of TCP-Connection-Alive packages are sent. When we open one javascript file in the browser it appears immediatly but the browser is still loading and showing "transfering data".

  • 1
    There is no good reason mod_proxy would slow things down like this. It's likrly a configuration error. To nail that down, though, you will need to examine logs, perform packet captured in various places, etc. – EEAA Jan 16 '15 at 12:53
  • Thanks for your answer. We analyzed it in more detail and improved our description above. – Andreas Wagner Jan 19 '15 at 13:13

2 Answers2

1

I had the same problem on Windows. I solved it by change url in proxy_pass.

Before change:

proxy_pass http://localhost;

After change:

proxy_pass http://127.0.0.1;

The problem is caused because localhost can be resolved as an ipv6 address (::1) and an ipv4 address (127.0.0.1) and the backend is not listening on both interfaces.

You can read more here: https://trac.nginx.org/nginx/ticket/496#ticket

Jacek Gzel
  • 111
  • 6
  • Thanks so much for this tidbit, disabling KeepAlive by itself was not enough. This did the trick! – SiegeX Mar 04 '19 at 10:06
0

Seems that if we turn off the keepAlive in the apache2.conf the pages are loaded with normal speed.