Skip to content

Commit

Permalink
Adding new parameters jkWorkerRetries and jkWorkerSocketTimeout to ge…
Browse files Browse the repository at this point in the history
…t around certain types of timeouts that cause 502 errors.
  • Loading branch information
sharumpe committed Jan 27, 2015
1 parent 1f1b582 commit db61bd7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions manifests/jk.pp
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
class apache2::jk
(
$jkLogLevel = "error",
$jkWorkerHost = "localhost",
$jkWorkerPort = 8009,
$apps = []
$jkLogLevel = "error",
$jkWorkerHost = "localhost",
$jkWorkerPort = 8009,
$jkWorkerRetries = 3,
$jkWorkerSocketTimeout = 60,
$apps = []
)
{
include apache2::params

validate_string( $jkLogLevel )
validate_string( $jkWorkerHost )
validate_string( $jkWorkerPort )
validate_string( $jkWorkerRetries )
validate_string( $jkWorkerSocketTimeout )
validate_array( $apps )

# install the package
Expand Down
6 changes: 3 additions & 3 deletions templates/default/etc/apache2/conf.d/jk.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
JkWorkerProperty worker.localJvm1.type=ajp13
JkWorkerProperty worker.localJvm1.host=<%= @jkWorkerHost %>
JkWorkerProperty worker.localJvm1.port=<%= @jkWorkerPort %>
JkWorkerProperty worker.localJvm1.socket_timeout=10
JkWorkerProperty worker.localJvm1.retries=3
JkWorkerProperty worker.localJvm1.lbfactor=50
JkWorkerProperty worker.localJvm1.socket_timeout=<%= @jkWorkerSocketTimeout %>
JkWorkerProperty worker.localJvm1.retries=<%= @jkWorkerRetries %>
JkWorkerProperty worker.localJvm1.lbfactor=1

# Set properties for the status worker
JkWorkerProperty worker.status.type=status
Expand Down

0 comments on commit db61bd7

Please sign in to comment.