RE: lb-problem with mod_jk: high cpu load on apache when tomcat breaks down

2001-05-29 Thread GOMEZ Henri

It seems to be a lifelock in mod_jk, because tomcat accepts the
connection, but is not able to reply. I think its that while-loop in
mod_jk:

That's all the magic of TCP IOs. You can connect, but you're not
sure that the remote server is ready to process your query.
Something which will be removed in AJP14 by the LOGIN feature.

Another beauty of socket API is that you couldn't be sure 
the write() call was really successfull before doing a read()
call.

Which make me think that when servicing a request we must add
somewhere a 'kind of timeout' in operation. But that complexify
also the process, since you had to play with NON-BLOCKED IO...


static int ajpv12_handle_response(ajp12_endpoint_t *p,
  jk_ws_service_t *s,
  jk_logger_t *l)
{
while(1) {
unsigned to_read = READ_BUF_SIZE;
unsigned acc = 0;
char *buf = NULL;

if(!jk_sb_read(p-sb, buf, to_read, acc)) {
jk_log(l, JK_LOG_ERROR, ajpv12_handle_response, error
reading
 from \n); return JK_FALSE;
}

if(!acc) {
jk_log(l, JK_LOG_DEBUG, ajpv12_handle_response, response
body is
 done\n); break;
}

if(write_to_ws) {
if(!s-write(s, buf, acc)) {
jk_log(l, JK_LOG_ERROR, ajpv12_handle_response, error
 writing back to server\n); write_to_ws = JK_FALSE;HERE
}
}
}
---


what do you think?

Greetings,
Timo

Guido Medina wrote:
 
 Yesd, I had, I changed to mod_jserv, I'm still waiting for 
the same answer
 as you do, for the high CPU request of mod_jk...
 
 Guido.
 - Original Message -
 From: Timo Carl [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, May 23, 2001 10:37 AM
 Subject: lb-problem with mod_jk: high cpu load on apache 
when tomcat breaks
 down
 
  Hello tomcat-users,
 
  We are having a problem with mod_jk and load balancing.
  Does anyone else have had similar problems with that kind of
  architecture setup?
 
  Our System:
  ===
  Alteon switch (round robin)
  |
  |
  three Apache 1.3.19 on three SPARC-Servers (called 
s1,s2,s3)(3 CPU, 3
  GB)
  |
  |each:
  mod_jk with lb (in case of s1: 1*s1,0.001*s2,0.001*s3)
  |
  |
  |
  two tomcats-3.2.1 on each server (jdk1.2.2, native threads, -Xms50M
  -Xoss4M -Xss4M -Xmx600M)
 
  We chose this architecture because the alteon is not able 
to perform
  session tracking properly.
 
  The Problem:
  
  On startup, the system works fine. Each java-Process has 
about 1-8% CPU
  load.
  After one day or so, one tomcat takes 40% CPU load or 
more. I think the
  reason is inside our applications. But thats not the error 
I want to
  post:
 
  After the error of a tomcat, the httpd-processes on EACH 
Server begin to
  take a lot of CPU time (8-30% each).
  In server-status I can see that the processes are waiting 
for a response
  of that tomcat.
  Of course I want to have a fault tolerance, but when I 
have a problem
  with one server, the other servers go down too.
 
 
  Did/Does anyone have the same problem and/or a similar system
  architecture?
  Maybe anyone solved that problem?
 
  Greetings and thanks in advance,
  Timo Carl

-- 



Timo Carl
Technik  Programmierung

travelchannel GmbH
Kehrwieder 8
D-20457 Hamburg
Telefon +49/40/38617-275
Telefax +49/40/38617-330

http://www.travelchannel.de - das neue Reisen




RE: lb-problem with mod_jk: high cpu load on apache when tomcat breaks down

2001-05-28 Thread GOMEZ Henri

Could you tell us if you're using ajp12 or ajp13 ?

The latest mod_jk in TC 3.3 cvs handle correctly the
case were on Tomcat failed or has been restarted 

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: Timo Carl [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 4:38 PM
To: [EMAIL PROTECTED]
Subject: lb-problem with mod_jk: high cpu load on apache when tomcat
breaks down


Hello tomcat-users,

We are having a problem with mod_jk and load balancing. 
Does anyone else have had similar problems with that kind of
architecture setup?

Our System:
===
Alteon switch (round robin)
|
|
three Apache 1.3.19 on three SPARC-Servers (called s1,s2,s3)(3 CPU, 3
GB)
|
|each:
mod_jk with lb (in case of s1: 1*s1,0.001*s2,0.001*s3)
|
|
|
two tomcats-3.2.1 on each server (jdk1.2.2, native threads, -Xms50M
-Xoss4M -Xss4M -Xmx600M)

We chose this architecture because the alteon is not able to perform
session tracking properly.

The Problem:

On startup, the system works fine. Each java-Process has about 1-8% CPU
load.
After one day or so, one tomcat takes 40% CPU load or more. I think the
reason is inside our applications. But thats not the error I want to
post:

After the error of a tomcat, the httpd-processes on EACH 
Server begin to
take a lot of CPU time (8-30% each).
In server-status I can see that the processes are waiting for 
a response
of that tomcat.
Of course I want to have a fault tolerance, but when I have a problem
with one server, the other servers go down too.


Did/Does anyone have the same problem and/or a similar system
architecture?
Maybe anyone solved that problem?

Greetings and thanks in advance,
Timo Carl




Re: lb-problem with mod_jk: high cpu load on apache when tomcat breaks down

2001-05-28 Thread Timo Carl

The problem has been seen on both, ajp13 and ajp12. 
We use tomcat-3.2.1.

What do think about using mod_jserv again?
What kind of quality has the T3.3 cvs mod_jk? Is it possible to use it
in a productive environment?

Greetings,
Timo

GOMEZ Henri wrote:
 
 Could you tell us if you're using ajp12 or ajp13 ?
 
 The latest mod_jk in TC 3.3 cvs handle correctly the
 case were on Tomcat failed or has been restarted 

begin:vcard 
n:Carl;Timo
tel;fax:++49/40/3703-7759
tel;work:++49/40/3703-7275
x-mozilla-html:FALSE
url:http://www.travelchannel.de
org:G+J travelchannel;Technik
version:2.1
email;internet:[EMAIL PROTECTED]
adr;quoted-printable:;;Am Baumwall 11=0D=0AD-20459 Hamburg
fn:Timo Carl
end:vcard



RE: lb-problem with mod_jk: high cpu load on apache when tomcat breaks down

2001-05-28 Thread GOMEZ Henri

The problem has been seen on both, ajp13 and ajp12. 
We use tomcat-3.2.1.

Ok, I'm using TC 3.2.2b5 and 3.3m3.

What do think about using mod_jserv again?

mod_jserv appears to be in end-of-life. No
more actively supported. I'd rather like see your
bug-report about the current apache tomcat connector
(mod_jk) 

What kind of quality has the T3.3 cvs mod_jk? Is it possible to use it
in a productive environment?

I used this one in production, it's stable and all
mod_jk bugs are fixed against this one since the
TC 3.2 is +/- closed for developpement (only fatal
bugs are to be fixed)


Greetings,
Timo

GOMEZ Henri wrote:
 
 Could you tell us if you're using ajp12 or ajp13 ?
 
 The latest mod_jk in TC 3.3 cvs handle correctly the
 case were on Tomcat failed or has been restarted 




Re: lb-problem with mod_jk: high cpu load on apache when tomcat breaks down

2001-05-25 Thread Timo Carl

I'm still waiting for the same answer
as you do, for the high CPU request of mod_jk...

Yes, so I do.
I did not find any article or post about that problem. So I did not
check out mod_jserv. Before tomcat, we use jserv without problems. I
think, we will give mod_jserv a chance.

It seems to be a lifelock in mod_jk, because tomcat accepts the
connection, but is not able to reply. I think its that while-loop in
mod_jk:

static int ajpv12_handle_response(ajp12_endpoint_t *p,
  jk_ws_service_t *s,
  jk_logger_t *l)
{
while(1) {
unsigned to_read = READ_BUF_SIZE;
unsigned acc = 0;
char *buf = NULL;

if(!jk_sb_read(p-sb, buf, to_read, acc)) {
jk_log(l, JK_LOG_ERROR, ajpv12_handle_response, error
reading
 from \n); return JK_FALSE;
}

if(!acc) {
jk_log(l, JK_LOG_DEBUG, ajpv12_handle_response, response
body is
 done\n); break;
}

if(write_to_ws) {
if(!s-write(s, buf, acc)) {
jk_log(l, JK_LOG_ERROR, ajpv12_handle_response, error
 writing back to server\n); write_to_ws = JK_FALSE;HERE
}
}
}
---


what do you think?

Greetings,
Timo

Guido Medina wrote:
 
 Yesd, I had, I changed to mod_jserv, I'm still waiting for the same answer
 as you do, for the high CPU request of mod_jk...
 
 Guido.
 - Original Message -
 From: Timo Carl [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, May 23, 2001 10:37 AM
 Subject: lb-problem with mod_jk: high cpu load on apache when tomcat breaks
 down
 
  Hello tomcat-users,
 
  We are having a problem with mod_jk and load balancing.
  Does anyone else have had similar problems with that kind of
  architecture setup?
 
  Our System:
  ===
  Alteon switch (round robin)
  |
  |
  three Apache 1.3.19 on three SPARC-Servers (called s1,s2,s3)(3 CPU, 3
  GB)
  |
  |each:
  mod_jk with lb (in case of s1: 1*s1,0.001*s2,0.001*s3)
  |
  |
  |
  two tomcats-3.2.1 on each server (jdk1.2.2, native threads, -Xms50M
  -Xoss4M -Xss4M -Xmx600M)
 
  We chose this architecture because the alteon is not able to perform
  session tracking properly.
 
  The Problem:
  
  On startup, the system works fine. Each java-Process has about 1-8% CPU
  load.
  After one day or so, one tomcat takes 40% CPU load or more. I think the
  reason is inside our applications. But thats not the error I want to
  post:
 
  After the error of a tomcat, the httpd-processes on EACH Server begin to
  take a lot of CPU time (8-30% each).
  In server-status I can see that the processes are waiting for a response
  of that tomcat.
  Of course I want to have a fault tolerance, but when I have a problem
  with one server, the other servers go down too.
 
 
  Did/Does anyone have the same problem and/or a similar system
  architecture?
  Maybe anyone solved that problem?
 
  Greetings and thanks in advance,
  Timo Carl

-- 



Timo Carl
Technik  Programmierung

travelchannel GmbH
Kehrwieder 8
D-20457 Hamburg
Telefon +49/40/38617-275
Telefax +49/40/38617-330

http://www.travelchannel.de - das neue Reisen

begin:vcard 
n:Carl;Timo
tel;fax:++49/40/3703-7759
tel;work:++49/40/3703-7275
x-mozilla-html:FALSE
url:http://www.travelchannel.de
org:G+J travelchannel;Technik
version:2.1
email;internet:[EMAIL PROTECTED]
adr;quoted-printable:;;Am Baumwall 11=0D=0AD-20459 Hamburg
fn:Timo Carl
end:vcard



lb-problem with mod_jk: high cpu load on apache when tomcat breaks down

2001-05-23 Thread Timo Carl

Hello tomcat-users,

We are having a problem with mod_jk and load balancing. 
Does anyone else have had similar problems with that kind of
architecture setup?

Our System:
===
Alteon switch (round robin)
|
|
three Apache 1.3.19 on three SPARC-Servers (called s1,s2,s3)(3 CPU, 3
GB)
|
|each:
mod_jk with lb (in case of s1: 1*s1,0.001*s2,0.001*s3)
|
|
|
two tomcats-3.2.1 on each server (jdk1.2.2, native threads, -Xms50M
-Xoss4M -Xss4M -Xmx600M)

We chose this architecture because the alteon is not able to perform
session tracking properly.

The Problem:

On startup, the system works fine. Each java-Process has about 1-8% CPU
load.
After one day or so, one tomcat takes 40% CPU load or more. I think the
reason is inside our applications. But thats not the error I want to
post:

After the error of a tomcat, the httpd-processes on EACH Server begin to
take a lot of CPU time (8-30% each).
In server-status I can see that the processes are waiting for a response
of that tomcat.
Of course I want to have a fault tolerance, but when I have a problem
with one server, the other servers go down too.


Did/Does anyone have the same problem and/or a similar system
architecture?
Maybe anyone solved that problem?

Greetings and thanks in advance,
Timo Carl

begin:vcard 
n:Carl;Timo
tel;fax:++49/40/3703-7759
tel;work:++49/40/3703-7275
x-mozilla-html:FALSE
url:http://www.travelchannel.de
org:G+J travelchannel;Technik
version:2.1
email;internet:[EMAIL PROTECTED]
adr;quoted-printable:;;Am Baumwall 11=0D=0AD-20459 Hamburg
fn:Timo Carl
end:vcard



Re: lb-problem with mod_jk: high cpu load on apache when tomcat breaks down

2001-05-23 Thread Guido Medina

Yesd, I had, I changed to mod_jserv, I'm still waiting for the same answer
as you do, for the high CPU request of mod_jk...

Guido.
- Original Message -
From: Timo Carl [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 23, 2001 10:37 AM
Subject: lb-problem with mod_jk: high cpu load on apache when tomcat breaks
down


 Hello tomcat-users,

 We are having a problem with mod_jk and load balancing.
 Does anyone else have had similar problems with that kind of
 architecture setup?

 Our System:
 ===
 Alteon switch (round robin)
 |
 |
 three Apache 1.3.19 on three SPARC-Servers (called s1,s2,s3)(3 CPU, 3
 GB)
 |
 |each:
 mod_jk with lb (in case of s1: 1*s1,0.001*s2,0.001*s3)
 |
 |
 |
 two tomcats-3.2.1 on each server (jdk1.2.2, native threads, -Xms50M
 -Xoss4M -Xss4M -Xmx600M)

 We chose this architecture because the alteon is not able to perform
 session tracking properly.

 The Problem:
 
 On startup, the system works fine. Each java-Process has about 1-8% CPU
 load.
 After one day or so, one tomcat takes 40% CPU load or more. I think the
 reason is inside our applications. But thats not the error I want to
 post:

 After the error of a tomcat, the httpd-processes on EACH Server begin to
 take a lot of CPU time (8-30% each).
 In server-status I can see that the processes are waiting for a response
 of that tomcat.
 Of course I want to have a fault tolerance, but when I have a problem
 with one server, the other servers go down too.


 Did/Does anyone have the same problem and/or a similar system
 architecture?
 Maybe anyone solved that problem?

 Greetings and thanks in advance,
 Timo Carl