Jump to content

Apache HTTP server 2.2, Mod_proxy, Tomcat 6 - Very slow connection


schinni

Recommended Posts

Hi,

 

I am facing a problem in my web application's deployment and would be grateful for any help in this regard. Thanks.

 

PROBLEM:

- When a client requests for our web application, the first page takes a very long time to load. It takes almost 3 minutes. After that, subsequent connections are quite fast. When i tried deleting the cache from the browser and try again, it takes under 20 seconds to display the first page (it is a simple login page). However, after several hours when i try again, it takes upto 3 minutes to display the first page.

 

BACKGROUND SETUP:

- We have a JSF web application deployed in apache tomcat 6

- Tomcat is being fronted by Apache 2.2 Http Server using mod_proxy.

- We have 2 Apache servers on different machines that are load balanced using DNS round robin

- We have 2 Apache tomcats on different machines that are load balanced using Apache Mod_proxy

- We have a CheckPoint firewall in between the Apache HTTP server and the Tomcat server.

- In my httpd.conf file, in addition to the mod_proxy configuration, I have also added

Timeout 1500

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 15 

 

Any help in this matter will be greatly appreciated.

Thanks!

Link to comment
Share on other sites

There are so many variables, you will have to debug it yourself.

 

Start with the tomcat 6 box. Put elinks or firefox on that machine and go directly to tomcat and do your tests.

Lather, Rinse, Repeat for all levels.

 

As for having 2 different apache servers doing nothing but mod_proxy, this sounds very excessive.

 

-steve

Link to comment
Share on other sites

Indeed, there are many variables. However, I have already tried debugging and googling all the aspects that i could think of.

 

The tomcat 6 box on its own works fine. I can instantly connect to both of them from any other computer on the network. However, when connecting via the apache HTTP server, this problem comes about. As regards being excessive, there are several business decisions that were made that led to this configuration. The HTTP servers are in the DMZ zone with a few applications running directly off of it while the tomcat boxes are within the firewall.

 

ISSUE:

As regards accessing the first page, there are times when the access to it is quite fast ( < 20 secs), and there are others when it takes upto 3 minutes.

 

OUR DEBUGGING STEPS:

The problem might reside with the following:

- Tomcat 6

- Apache HTTP server 2.2

- Mod proxy

- Checkpoint firewall

- Internet Upload speed / Network traffic

 

We eliminated Tomcat 6 as the possible cause since we are able to access it instantly from any other computer within the network. The HTTP server is not so easy to eliminate. I have added the KeepAlive configuration since it could have been a possible cause. However, it still does not help solve the problem. Internet upload speed and network traffic can be eliminated since the effect would have been felt in certain other tasks which do not seem to be affected.

 

Hence, the possible cause could be related to HTTP server 2.2, mod proxy or checkpoint firewall. At this point, we are looking for advice in case anyone else has faced a similar situation before or is able to point to us the direction we should proceed in to help resolve this issue.

 

Thanks for taking the time and any help is greatly appreciated. Thanks!

 

Link to comment
Share on other sites

Ive used apache + mod_proxy to access various tomcat applications, and never had to wait 3 minutes for an initial connection.

 

One thing it could be - your apache box is trying to do a Reverse DNS lookup on the ip accessing it. Generally rdns lookups can take up to 3 minutes before they timeout.

 

An easy way to test whether its an internet /network traffic issue would be to install httping and have it run ever 30 minutes overnight etc. when you know that network speed is not an issue.

 

Lastly, the checkpoint firewall, you might have to start logging on it to see what packets are going/coming during that 3 minutes.

 

-steve

Link to comment
Share on other sites

I have added a Keep Alive for the mod_proxy setup in the httpd.conf and now it is much better. It is on an average taking around 30 seconds to load for the first page with best case timing being 2 seconds and worst case around 45 seconds.

 

However, i still have an issue overall. My site loads in the intranet within the firewall (direct from tomcat thus bypassing apache http server and mod_proxy) at amazing speeds, almost instantaneous. However, the same thing takes on an average, 20 seconds to load each page or execute each action on a page.

 

Would appreciate any suggestions on what direction i should follow my investigation in and where the potential problem(s) could be.

 

Thanks so much!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.