>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
>

Reply via email to