tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r701435 - in /tomcat/connectors/trunk/jk/native: apache-2.0/mod_jk.c iis/jk_isapi_plugin.c
Date Fri, 03 Oct 2008 16:35:58 GMT
Author: rjung
Date: Fri Oct  3 09:35:57 2008
New Revision: 701435

URL: http://svn.apache.org/viewvc?rev=701435&view=rev
Log:
Minor watchdig enhancements:
- Reset watchdog interval to 0, if thread creation
  fails (so we use the request based maintenance)
  and any partially initialized thread might stop.
- Let Apache log similar messages as IIS
- Check and correct negative interval values in IIS like
  we do in Apache
- Use JK log for thread creation error message, because
  at that time we already have it available.

Modified:
    tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
    tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=701435&r1=701434&r2=701435&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Fri Oct  3 09:35:57 2008
@@ -2820,7 +2820,8 @@
 
     if (JK_IS_DEBUG_LEVEL(conf->log))
         jk_log(conf->log, JK_LOG_DEBUG,
-               "Watchdog initialized");
+               "Watchdog thread initialized with %d second interval",
+               jk_watchdog_interval);
     for (;;) {
         for (i = 0; i < jk_watchdog_interval; i++) {
             apr_sleep(apr_time_from_sec(1));
@@ -2831,7 +2832,7 @@
             break;
         if (JK_IS_DEBUG_LEVEL(conf->log))
            jk_log(conf->log, JK_LOG_DEBUG,
-                  "Watchdog running");
+                  "Watchdog thread running");
         wc_maintain(conf->log);
     }
     return NULL;
@@ -2862,8 +2863,9 @@
 #if APR_HAS_THREADS
         rv = apr_thread_create(&wdt, NULL, jk_watchdog_func, conf, pconf);
         if (rv != APR_SUCCESS) {
-            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
-                     "mod_jk: could not init JK watchdog thread");
+            jk_log(conf->log, JK_LOG_ERROR,
+                   "Could not init watchdog thread, error=%d", rv);
+            jk_watchdog_interval = 0;
         }
         apr_thread_detach(wdt);
 #endif

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=701435&r1=701434&r2=701435&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Fri Oct  3 09:35:57 2008
@@ -2579,6 +2579,8 @@
 #endif
     reject_unsafe = get_config_bool(src, REJECT_UNSAFE_TAG, JK_FALSE);
     watchdog_interval = get_config_int(src, WATCHDOG_INTERVAL_TAG, 0);
+    if (watchdog_interval < 0)
+        watchdog_interval = 0;
 #ifdef ISAPI_ALLOW_CHUNKING
     chunked_encoding_enabled = get_config_bool(src, ENABLE_CHUNKED_ENCODING_TAG, JK_FALSE);
 #endif



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message