mturk 2005/05/15 04:10:12 Modified: jk/native/apache-1.3 mod_jk.c jk/native/apache-2.0 mod_jk.c jk/native/common jk_util.c jk_util.h jk_worker.c jk/native/iis jk_isapi_plugin.c jk/native/netscape jk_nsapi_plugin.c jk/xdocs changelog.xml jk/xdocs/config workers.xml Log: Added worker.maintain directive that allows customizing default 10 second maintain timeout. Revision Changes Path 1.82 +1 -2 jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c Index: mod_jk.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -r1.81 -r1.82 --- mod_jk.c 14 May 2005 10:08:23 -0000 1.81 +++ mod_jk.c 15 May 2005 11:10:11 -0000 1.82 @@ -1738,7 +1738,6 @@ private_data.read_body_started = JK_FALSE; private_data.r = r; - /* TODO: Make maintain call configurable */ wc_maintain(l); jk_init_ws_service(&s); 1.145 +1 -2 jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c Index: mod_jk.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v retrieving revision 1.144 retrieving revision 1.145 diff -u -r1.144 -r1.145 --- mod_jk.c 14 May 2005 10:08:23 -0000 1.144 +++ mod_jk.c 15 May 2005 11:10:11 -0000 1.145 @@ -1868,7 +1868,6 @@ private_data.read_body_started = JK_FALSE; private_data.r = r; - /* TODO: Make maintain call configurable */ wc_maintain(xconf->log); jk_init_ws_service(&s); 1.68 +10 -2 jakarta-tomcat-connectors/jk/native/common/jk_util.c Index: jk_util.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_util.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- jk_util.c 5 May 2005 17:52:27 -0000 1.67 +++ jk_util.c 15 May 2005 11:10:11 -0000 1.68 @@ -76,7 +76,9 @@ #define RETRIES_OF_WORKER ("retries") #define DEFAULT_WORKER JK_AJP13_WORKER_NAME -#define WORKER_LIST_PROPERTY_NAME ("worker.list") +#define WORKER_LIST_PROPERTY_NAME ("worker.list") +#define WORKER_MAINTAIN_PROPERTY_NAME ("worker.maintain") +#define DEFAULT_MAINTAIN_TIME (60) #define DEFAULT_LB_FACTOR (1) #define LOG_FORMAT ("log_format") @@ -822,6 +824,12 @@ return JK_FALSE; } +int jk_get_worker_maintain_time(jk_map_t *m) +{ + return jk_map_get_int(m, WORKER_MAINTAIN_PROPERTY_NAME, + DEFAULT_MAINTAIN_TIME); +} + int jk_get_worker_mx(jk_map_t *m, const char *wname, unsigned *mx) { char buf[1024]; 1.33 +2 -1 jakarta-tomcat-connectors/jk/native/common/jk_util.h Index: jk_util.h =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_util.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- jk_util.h 26 Apr 2005 15:28:18 -0000 1.32 +++ jk_util.h 15 May 2005 11:10:11 -0000 1.33 @@ -147,6 +147,7 @@ int jk_get_worker_def_cache_size(int protocol); +int jk_get_worker_maintain_time(jk_map_t *m); #define TC32_BRIDGE_TYPE 32 #define TC33_BRIDGE_TYPE 33 1.33 +6 -6 jakarta-tomcat-connectors/jk/native/common/jk_worker.c Index: jk_worker.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_worker.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- jk_worker.c 24 Apr 2005 09:54:47 -0000 1.32 +++ jk_worker.c 15 May 2005 11:10:11 -0000 1.33 @@ -38,6 +38,7 @@ /* Global worker list */ static jk_map_t *worker_map; static JK_CRIT_SEC worker_lock; +static int worker_maintain_time = 0; int wc_open(jk_map_t *init_data, jk_worker_env_t *we, jk_logger_t *l) { @@ -65,6 +66,8 @@ return JK_FALSE; } + worker_maintain_time = jk_get_worker_maintain_time(init_data); + if (!build_worker_map(init_data, we->worker_list, we->num_of_workers, we, l)) { close_workers(l); @@ -279,15 +282,12 @@ JK_TRACE_ENTER(l); - /* TODO: make maintatin time configurable - * For now use 10 seconds. - */ - if (sz > 0) { + if (sz > 0 && worker_maintain_time > 0) { int i; time_t now; JK_ENTER_CS(&worker_lock, i); now = time(NULL); - if (difftime(now, last_maintain) >= 10) { + if (difftime(now, last_maintain) >= worker_maintain_time) { last_maintain = now; JK_LEAVE_CS(&worker_lock, i); for (i = 0; i < sz; i++) { 1.48 +1 -2 jakarta-tomcat-connectors/jk/native/iis/jk_isapi_plugin.c Index: jk_isapi_plugin.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/iis/jk_isapi_plugin.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- jk_isapi_plugin.c 24 Apr 2005 10:02:16 -0000 1.47 +++ jk_isapi_plugin.c 15 May 2005 11:10:11 -0000 1.48 @@ -985,7 +985,6 @@ jk_pool_atom_t buf[SMALL_POOL_SIZE]; char *worker_name; - /* TODO: Make maintain call configurable */ wc_maintain(logger); jk_init_ws_service(&s); jk_open_pool(&private_data.p, buf, sizeof(buf)); 1.24 +1 -2 jakarta-tomcat-connectors/jk/native/netscape/jk_nsapi_plugin.c Index: jk_nsapi_plugin.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/netscape/jk_nsapi_plugin.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- jk_nsapi_plugin.c 24 Apr 2005 10:02:16 -0000 1.23 +++ jk_nsapi_plugin.c 15 May 2005 11:10:11 -0000 1.24 @@ -322,7 +322,6 @@ s.ws_private = &private_data; s.pool = &private_data.p; - /* TODO: Make maintain call configurable */ wc_maintain(logger); if (init_ws_service(&private_data, &s)) { jk_endpoint_t *e = NULL; 1.31 +19 -14 jakarta-tomcat-connectors/jk/xdocs/changelog.xml Index: changelog.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/changelog.xml,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- changelog.xml 14 May 2005 10:16:13 -0000 1.30 +++ changelog.xml 15 May 2005 11:10:12 -0000 1.31 @@ -21,37 +21,42 @@ new documentation project for JK has been started. </p> </section> -<section name="Changes with JK 1.2.12"> +<section name="Changes with JK 1.2.13"> <br /> <subsection name="Native"> <changelog> <update> - Added ForwardLocallAddres JkOptions flag for passing local instead remote - address. Useful for remote addr valve. (mturk) + Added worker.maintain directive to allow customizing default 10 + second timeout. On busy servers this value needs to be set on + higher value. (mturk) </update> - <fix>Fix that worker not used, when stopped flag is true. (pero) - </fix> + <fix> + Fix for NetWare compiler to deal with different types between AP13 + and AP2 SDKs. (fuankg) + </fix> <update> - Add loadbalance default worker secret attribute to the documentation (pero) + Emit much more legible user.dmp crash analysis output for WIN32. (wrowe) </update> + <fix> + <bug>34558</bug>: Fix first failover request. (mturk) + </fix> </changelog> </subsection> </section> -<section name="Changes with JK 1.2.13"> +<section name="Changes with JK 1.2.12"> <br /> <subsection name="Native"> <changelog> - <fix> - Fix for NetWare compiler to deal with different types between AP13 - and AP2 SDKs. (fuankg) - </fix> <update> - Emit much more legible user.dmp crash analysis output for WIN32. (wrowe) + Added ForwardLocallAddres JkOptions flag for passing local instead remote + address. Useful for remote addr valve. (mturk) </update> - <fix> - <bug>34558</bug>: Fix first failover request. (mturk) + <fix>Fix that worker not used, when stopped flag is true. (pero) </fix> + <update> + Add loadbalance default worker secret attribute to the documentation (pero) + </update> </changelog> </subsection> </section> 1.18 +8 -0 jakarta-tomcat-connectors/jk/xdocs/config/workers.xml Index: workers.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/config/workers.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- workers.xml 5 May 2005 17:29:47 -0000 1.17 +++ workers.xml 15 May 2005 11:10:12 -0000 1.18 @@ -74,6 +74,14 @@ the web server plugin will instantiate the workers whose name appears in the worker.list property, these are also the workers to whom you can map requests. </directive> +<directive name="worker.maintain" default="60" required="false"> +Worker connection pool maintain timeout in seconds. If set to the positive +value JK will scan all connections for all workers specified in worker.list +directive and check if connections needs to be recycled. +<p> +This feature has been added in <b>jk 1.2.13</b>. +</p> +</directive> </directives> </subsection>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]