svn commit: r406103 - /tomcat/connectors/trunk/jk/native/common/jk_worker.c

2006-05-13 Thread rjung
Author: rjung
Date: Sat May 13 06:53:59 2006
New Revision: 406103

URL: http://svn.apache.org/viewcvs?rev=406103&view=rev
Log:
Only log removing of old worker, when we actually do it.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_worker.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_worker.c
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_worker.c?rev=406103&r1=406102&r2=406103&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_worker.c Sat May 13 06:53:59 
2006
@@ -244,11 +244,11 @@
 return JK_FALSE;
 }
 
-if (JK_IS_DEBUG_LEVEL(l))
-jk_log(l, JK_LOG_DEBUG,
-   "removing old %s worker",
-   worker_list[i]);
 if (oldw) {
+if (JK_IS_DEBUG_LEVEL(l))
+jk_log(l, JK_LOG_DEBUG,
+   "removing old %s worker",
+   worker_list[i]);
 oldw->destroy(&oldw, l);
 }
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r405672 - in /tomcat/connectors/trunk/jk/native/common: jk_map.c, jk_uri_worker_map.h

2006-05-13 Thread Rainer Jung

-- Resent, because of mail setup problems during original commit --
Author: rjung
Date: Wed May 10 01:12:29 2006
New Revision: 405672

URL: http://svn.apache.org/viewcvs?rev=405672&view=rev
Log:
Remove unnecessary includes.
Small first commit to also test eol style etc.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_map.c
tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_map.c?rev=405672&r1=405671&r2=405672&view=diff

==
--- tomcat/connectors/trunk/jk/native/common/jk_map.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_map.c Wed May 10 
01:12:29 2006

@@ -29,7 +29,6 @@
 #include "jk_pool.h"
 #include "jk_map.h"
 #include "jk_util.h"
-#include "jk_shm.h"

 #define CAPACITY_INC_SIZE (50)
 #define LENGTH_OF_LINE(8192)

Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h?rev=405672&r1=405671&r2=405672&view=diff

==
--- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h Wed May 
10 01:12:29 2006

@@ -33,7 +33,6 @@
 #include "jk_map.h"
 #include "jk_logger.h"
 #include "jk_mt.h"
-#include "jk_shm.h"

 /* Urimap reload time. Use 60 seconds by default.
  */

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r405677 - in /tomcat/connectors/trunk/jk/native/common: jk_shm.c, jk_shm.h

2006-05-13 Thread Rainer Jung

-- Resent, because of mail setup problems during original commit --
Author: rjung
Date: Wed May 10 01:41:48 2006
New Revision: 405677

URL: http://svn.apache.org/viewcvs?rev=405677&view=rev
Log:
Replace hard coded size of magic header by macro.
Compute size of shm using sizeof.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_shm.c
tomcat/connectors/trunk/jk/native/common/jk_shm.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.c
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_shm.c?rev=405677&r1=405676&r2=405677&view=diff

==
--- tomcat/connectors/trunk/jk/native/common/jk_shm.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_shm.c Wed May 10 
01:41:48 2006

@@ -30,7 +30,7 @@
 struct jk_shm_header_data
 {
 /* Shared memory magic JK_SHM_MAGIC */
-char   magic[8];
+char   magic[JK_SHM_MAGIC_SIZ];
 size_t size;
 size_t pos;
 unsigned int childs;
@@ -127,7 +127,7 @@
 jk_shmem.filename = "memory";
 jk_shmem.fd   = 0;
 jk_shmem.attached = 0;
-memcpy(jk_shmem.hdr->h.data.magic, shm_signature, 8);
+memcpy(jk_shmem.hdr->h.data.magic, shm_signature, JK_SHM_MAGIC_SIZ);
 jk_shmem.hdr->h.data.size = sz;
 JK_INIT_CS(&(jk_shmem.cs), rc);
 if (JK_IS_DEBUG_LEVEL(l))
@@ -320,7 +320,7 @@
 /* Clear shared memory */
 if (!attached) {
 memset(jk_shmem.hdr, 0, jk_shmem.size);
-memcpy(jk_shmem.hdr->h.data.magic, shm_signature, 8);
+memcpy(jk_shmem.hdr->h.data.magic, shm_signature, 
JK_SHM_MAGIC_SIZ);

 jk_shmem.hdr->h.data.size = sz;
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,

Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.h
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_shm.h?rev=405677&r1=405676&r2=405677&view=diff

==
--- tomcat/connectors/trunk/jk/native/common/jk_shm.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_shm.h Wed May 10 
01:41:48 2006

@@ -44,11 +44,14 @@
 #define JK_SHM_URI_SIZ  127
 #define JK_SHM_DYNAMIC  16
 #define JK_SHM_MAGIC'!', 'J', 'K', 'S', 'H', 'M', JK_SHM_MAJOR, 
JK_SHM_MINOR

+#define JK_SHM_MAGIC_SIZ  8

 /* Really huge numbers, but 64 workers should be enough */
 #define JK_SHM_MAX_WORKERS  64
-#define JK_SHM_DEF_SIZE (JK_SHM_MAX_WORKERS * 512)
-#define JK_SHM_ALIGN(x) JK_ALIGN(x, 64)
+#define JK_SHM_WORKER_SIZE  JK_SHM_ALIGN(sizeof(jk_shm_worker_t))
+#define JK_SHM_DEF_SIZE (JK_SHM_MAX_WORKERS * JK_SHM_WORKER_SIZE)
+#define JK_SHM_ALIGNMENT64
+#define JK_SHM_ALIGN(x) JK_ALIGN(x, JK_SHM_ALIGNMENT)

 /* Use 1 minute for measuring read/write data */
 #define JK_SERVICE_TRANSFER_INTERVAL60

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r406109 - in /tomcat/connectors/trunk/jk/native/common: jk_lb_worker.c jk_lb_worker.h jk_status.c

2006-05-13 Thread rjung
Author: rjung
Date: Sat May 13 07:07:00 2006
New Revision: 406109

URL: http://svn.apache.org/viewcvs?rev=406109&view=rev
Log:
Move lb_method_type to jk_lb_worker.h to make it
available for jk_status and jk_lb_worker.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h
tomcat/connectors/trunk/jk/native/common/jk_status.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=406109&r1=406108&r2=406109&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sat May 13 07:07:00 
2006
@@ -628,8 +628,8 @@
 }
 if (rc && JK_IS_DEBUG_LEVEL(l)) {
 jk_log(l, JK_LOG_DEBUG,
-   "found best worker (%s) using %s method", rc->s->name,
-   p->lbmethod == JK_LB_BYREQUESTS ? "by request" : "by traffic");
+   "found best worker (%s) using method '%s'",
+   rc->s->name, lb_method_type[p->lbmethod]);
 }
 JK_TRACE_EXIT(l);
 return rc;

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h?rev=406109&r1=406108&r2=406109&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h Sat May 13 07:07:00 
2006
@@ -50,6 +50,14 @@
 
 #define WAIT_BEFORE_RECOVER   (60)
 
+static const char *lb_method_type[] = {
+JK_LB_METHOD_REQUESTS,
+JK_LB_METHOD_TRAFFIC,
+JK_LB_METHOD_BUSYNESS,
+"unknown",
+NULL
+};
+
 struct worker_record
 {
 jk_worker_t *w;

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_status.c?rev=406109&r1=406108&r2=406109&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat May 13 07:07:00 
2006
@@ -90,14 +90,6 @@
 NULL
 };
 
-static const char *lb_method_type[] = {
-JK_LB_METHOD_REQUESTS,
-JK_LB_METHOD_TRAFFIC,
-JK_LB_METHOD_BUSYNESS,
-"unknown",
-NULL
-};
-
 #define HEADERS_NO_CACHE "no-cache", "no-cache", NULL
 
 static const char *headers_vhtml[] = {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r406110 - in /tomcat/connectors/trunk/jk/native/common: jk_lb_worker.c jk_lb_worker.h

2006-05-13 Thread rjung
Author: rjung
Date: Sat May 13 07:11:04 2006
New Revision: 406110

URL: http://svn.apache.org/viewcvs?rev=406110&view=rev
Log:
Move comment that got detached from it's code to the right file.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=406110&r1=406109&r2=406110&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sat May 13 07:11:04 
2006
@@ -38,9 +38,6 @@
  * The load balancing code in this
  */
 
-/*
- * Time to wait before retry...
- */
 #define JK_WORKER_IN_ERROR(w) ((w)->in_error_state  && !(w)->is_busy)
 #define JK_WORKER_USABLE(w)   (!(w)->in_error_state && !(w)->is_stopped && 
!(w)->is_disabled && !(w)->is_busy)
 

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h?rev=406110&r1=406109&r2=406110&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h Sat May 13 07:11:04 
2006
@@ -48,6 +48,9 @@
 #define JK_LB_LM_DEFAULT   ("Optimistic")
 #define JK_LB_LM_PESSIMISTIC   ("Pessimistic")
 
+/*
+ * Time to wait before retry...
+ */
 #define WAIT_BEFORE_RECOVER   (60)
 
 static const char *lb_method_type[] = {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39573] - CPU SPIKING HIGH TO 100%

2006-05-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39573


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2006-05-13 14:18 ---
A couple of comments:

1. There is no need to shout.

2. The JAXRPC servlet is sat in the middle of your stack trace. This suggests an
applciation / JAXRPC issue to me. The exception is expected when the client
closes the connection before it has sent all the data. I wonder whether JAXRPC
correctly handles this situation?

3. You have provided no information on how to reproduce this issue.

4. You have reported this issue against a very old version of Tomcat. I would
suggest an upgrade to at least 4.1.31 and better still the latest 5.5.x (not
that I expect it to help with this issue)

5. This question belongs on the users list until such time there is some
evidence of a Tomcat bug.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]