https://issues.apache.org/bugzilla/show_bug.cgi?id=46808
Summary: mod_jk 1.2.27 can't detect network error Product: Tomcat Connectors Version: 1.2.27 Platform: PC OS/Version: All Status: NEW Severity: minor Priority: P2 Component: Common AssignedTo: dev@tomcat.apache.org ReportedBy: mashm...@gmail.com Created an attachment (id=23337) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23337) patch for jk_lb_worker.c For instance, assume to use one lb worker with two sub workers. When the network cable of one AP server is pulled out, ajp_send_request() returns JK_FATAL_ERROR. Because the state of lbworker doesn't become JK_LB_STATE_ERROR when "rec->s->busy" is larger than 0, there is a possibility that the next request is transmitted to the server to which the network cable has been pulled out. In this case, the request wasted additional time for connecting. This additional time depends on "socket_timeout"( or "socket_connect_timeout") and "retries". Actually, when the network cable was pulled out by intention in the load test, such a situation was generated. And the waste of time continued until the network cable was reconnected. If the request has stickyness, it seems that the waste of time can be reduced by using JvmRouteBinderValve on the Tomcat. In case of mod_jk 1.2.22, the situation like 1.2.27 was not generated because it made an error of the state of the lbworker if the connection failed. In the following cases, ajp_service() returns JK_FATAL_ERROR. In these cases, it seems that there might be no problem even if the state of lbworker becomes an error state. * JK_FATAL_ERROR JK_FALSE ajp_connection_tcp_send_message() returns JK_FATAL_ERROR * Endpoint belongs to unknown protocol. * JK_FATAL_ERROR JK_TRUE ajp_connection_tcp_send_message() returns JK_FALSE * Sending request or request body in jk_tcp_socket_sendfull() returns with error. * JK_FATAL_ERROR JK_TRUE Could not connect to backend * JK_FATAL_ERROR ? ajp_process_callback() returns JK_AJP13_ERROR * JK_AJP13_ERROR: protocol error, or JK_INTERNAL_ERROR: chunk size to large Index: mod_jk-head/native/common/jk_lb_worker.c =================================================================== --- mod_jk-head/native/common/jk_lb_worker.c (revision 750704 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=750704 )) +++ mod_jk-head/native/common/jk_lb_worker.c (working copy) @@ -1339,12 +1339,8 @@ * Time for fault tolerance (if possible)... */ rec->s->errors++; - if (rec->s->busy) { - rec->s->state = JK_LB_STATE_OK; - } - else { - rec->s->state = JK_LB_STATE_ERROR; - } + rec->s->state = JK_LB_STATE_ERROR; + p->states[rec->i] = JK_LB_STATE_ERROR; rec->s->error_time = time(NULL); rc = JK_FALSE; Best regards. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org