logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: KeepAliveTimeout settings
Author
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Fri 28 Feb '14 11:58    Post subject: KeepAliveTimeout settings Reply with quote

For more than several months i have problem with one of the website, served by 3 Apache instances - two of them are the frontend for several JBoss application server nodes connected via mod_jk module, another instance is serving static content.

Apache A - main webpage - www.mydomain.com
Apache B - statistics displayed on main webpage - stats.mydomain.com
Apache C - static content for both domains above - static.mydomain.com

All Apache instances and JBoss nodes works in the same local network. The problem is that during the traffic picks on the www.mydomain.com, Apache B (which is only responsible for displaying the AJAX statistics) became very slow - the Apache B response time is very often more than 30 seconds.

I had Nagios monitoring system in place, which is monitoring all apache instances. During the traffic picks on the website i'm alerted by Nagios that 30 seconds response time threshold (default for nagios) for Apache B has been exceeded. I had also noticed that response times on mod_jk - so between Apache B and JBoss nodes (which are actually serving the statistics content) is growing for that moments.

I'm 99% sure that this is not the problem mod_jk related, as the same Jboss node is responding very fast to Apache A in the same time.

I belive that the problem could be related to KeepAliveTimeout settings on Apache which are set up to values :

Apache A - 3
Apache B - 6 (changed from 3 yestarday)
Apache C - 3


Now it's time for the real question - what's are the good practice rules for setting the KeepAliveTimeout ? I have to admit that i'm confused, as from the one source KeepAlive is recommended to be off, other sources says it's recommended to be set up to small value between 1-5 seconds and i know the cases when 120 seconds for some VH are required.

Maybe there is no universal and general rules which could be applied straight for every system but it must be some guidlines how to measure it, how to decide, what has impact on the final settings.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 07 Mar '14 17:23    Post subject: Reply with quote

Do you run three instances of the same host or just 3 vhosts? Different network cards or a single one?
Tried loadbalancing for the JBoss nodes that are slow?
Back to top
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Sun 09 Mar '14 15:04    Post subject: Reply with quote

It's 3 different instances (not vhosts) running on one same VM through one single network card. JBoss is already balanced.
Back to top


Reply to topic   Topic: KeepAliveTimeout settings View previous topic :: View next topic
Post new topic   Forum Index -> Apache