tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Baker" <jba...@javasystemsolutions.com>
Subject Re: 2 second delays in mod_jk while "maintaining workers"
Date Wed, 08 Sep 2010 09:56:42 GMT
Hello

We've just noticed that the maintenance mode operates on all workers, so
having one worker run maintenance for the rest is making tracing the
problem difficult.  Reading down the logs, we can see it finds a worker
and iterates through workers perforing maintenance.

Is this correct?

Moving on, consider the following debug:

[Wed Sep 08 10:36:16.907 2010] [2205:47701852022112] [trace]
ajp_abort_endpoint::jk_ajp_common.c (739): enter
[Wed Sep 08 10:36:16.907 2010] [2205:47701852022112] [trace]
jk_shutdown_socket::jk_connect.c (713): enter
[Wed Sep 08 10:36:16.907 2010] [2205:47701852022112] [debug]
jk_shutdown_socket::jk_connect.c (722): About to shutdown socket

The next entry in the log with [2205:47701852022112] is the following:

[Wed Sep 08 10:36:18.907 2010] [2205:47701852022112] [trace]
jk_close_socket::jk_connect.c (650): enter
[Wed Sep 08 10:36:18.908 2010] [2205:47701852022112] [trace]
jk_close_socket::jk_connect.c (665): exit
[Wed Sep 08 10:36:18.908 2010] [2205:47701852022112] [debug]
jk_shutdown_socket::jk_connect.c (813): Shutdown socket 156 and read 0
lingering bytes in 2 sec.
[Wed Sep 08 10:36:18.908 2010] [2205:47701852022112] [trace]
jk_shutdown_socket::jk_connect.c (817): exit

Looking at the code in jk_connect.c:

int jk_shutdown_socket(jk_sock_t sd, jk_logger_t *l)
{
...
    if (JK_IS_DEBUG_LEVEL(l))
        jk_log(l, JK_LOG_DEBUG, "About to shutdown socket %d", sd);

    /* Shut down the socket for write, which will send a FIN
     * to the peer.
     */
    if (shutdown(sd, SHUT_WR)) {
        rc = jk_close_socket(sd, l);


And the jk_close_socket function:

int jk_close_socket(jk_sock_t sd, jk_logger_t *l)
{
    int rc;
    int save_errno;

    JK_TRACE_ENTER(l);

Tieing up with the logs suggests the shutdown(sd, SHUT_WR) method is
blocking.

Any thoughts,


John









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


Mime
View raw message