www/74622: Apache2 + mod_jk2 - default socket timeout

Michael Diener michael at synchronica.com
Thu Dec 2 09:20:28 PST 2004


>Number:         74622
>Category:       www
>Synopsis:       Apache2 + mod_jk2 - default socket timeout
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-www
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 02 17:20:28 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Michael Diener
>Release:        5.3
>Organization:
>Environment:
>Description:
I've got a problem with mod_jk2 and Apache2 under FreeBSD and I think it is a bug. I configured mod_jk2 for two Tomcat servers. If one of these machines is down (unplugging the network cable), mod_jk2 should send all requests to the server that kept running. That is working 90 percent of the time, but sometimes forwarding the request takes about 75 seconds. I found out that this is the default socket timeout of FreeBSD. The problem is that I configured mod-jk2 the way, that it has its own timeout for connecting (see attached workers2.properties). But this value is not recognized. If I decrease the default connect timeout for FreeBSD (by /etc/sysctl.conf),
mod_jk2 will use this value and everything is fine. But I don't want to decrease that value, it could cause other problems.
So I think it is a bug, that mod_jk2 is not using the timeout values from its workers2.properties in FreeBSD.
Btw exactly the same setup for Apache2 and mod_jk2 works fine on Linux.


------------------------------

[logger]
level=DEBUG

[shm]
file=/tmp/shmFile

# Defines a load balancer named lb. 
[lb:lb]

[workerEnv:]
info=Global server options
timing=1

# Example socket channel, override port and host.
[channel.socket:192.168.1.124:8009]
tomcatId=camenzind
timeout=1

# Example socket channel, override port and host.
[channel.socket:192.168.1.123:8009]
tomcatId=haller
timeout=1

# define the worker 1
[ajp13:192.168.1.124:8009]
channel=channel.socket:192.168.1.124:8009

# define the worker 2
[ajp13:192.168.1.123:8009]
channel=channel.socket:192.168.1.123:8009

# Mapping my URI to Tomcats
[uri:/myURI*]
group=lb

[status:]
info=Status worker, displays runtime information

[uri:/jkstatus/*]
info=The Tomcat /jkstatus handler
group=status:


>How-To-Repeat:
install apache2 and mod_jk2
setup apache2 for mod_jk2
take the given workers2.properties
setup 2 different machines with tomcat
configure them to be able to support sicky sessions

if everything is running the apache should forward the request alternately to one of the tomcats
if you unplug one of the machines from the net, the forward will hang sometimes for exactly 75 seconds (the defaulkt socket timeout in FreeBSD)

mod_jk2 has to use the defined timeout from workers2.properties
>Fix:
      
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-www mailing list