From aa1c088bd45a254290ad202875eb87c4bd4eeb2a Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 16 Jan 2014 11:41:01 -0500 Subject: [PATCH] LP#1268619: websockets : added config docs to install readme Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- README.websockets | 19 +++++++++++++++++++ src/gateway/osrf_websocket_translator.c | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.websockets b/README.websockets index c9f2391..0b94fd3 100644 --- a/README.websockets +++ b/README.websockets @@ -40,6 +40,25 @@ done # remove the websocket module from the default OpenSRF Apache instance % a2dismod osrf_websocket_translator +# optional: add these configuration variables to +# /etc/init.d/apache2-websockets/envvars and adjust as needed. +# export OSRF_WEBSOCKET_IDLE_TIMEOUT=60 +# export OSRF_WEBSOCKET_IDLE_CHECK_INTERVAL=5 +# export OSRF_WEBSOCKET_CONFIG_FILE=/openils/conf/opensrf_core.xml +# export OSRF_WEBSOCKET_CONFIG_CTXT=gateway +# +# IDLE_TIMEOUT specifies how long we will allow a client to stay connected +# while idle. A longer timeout means less network traffic (from fewer +# websocket CONNECT calls), but it also means more Apache processes are +# tied up doing nothing. +# +# IDLE_CHECK_INTERVAL specifies how often we wake to check the idle status +# of the connected client. +# +# Both specified in seconds +# +# CONFIG_FILE / CTXT are the standard opensrf core config options. + # After OpenSRF is up and running, fire up the secondary Apache instance # errors will appear in /var/log/apache2-websockets/error.log % /etc/init.d/apache2-websockets restart diff --git a/src/gateway/osrf_websocket_translator.c b/src/gateway/osrf_websocket_translator.c index e2cfc98..6a0caac 100644 --- a/src/gateway/osrf_websocket_translator.c +++ b/src/gateway/osrf_websocket_translator.c @@ -98,7 +98,7 @@ // default values, replaced during setup (below) as needed. static char* config_file = "/openils/conf/opensrf_core.xml"; static char* config_ctxt = "gateway"; -static time_t idle_timeout_interval = 300; +static time_t idle_timeout_interval = 60; static time_t idle_check_interval = 5; static time_t last_activity_time = 0; -- 2.43.2