Thanks for the reply Mladen. I was wrong, this is not a lingering time problem, but instead related to the value that is being used for MAX_SECS_TO_LINGER, which is 16. I still have data waiting to be transferred from Tomcat after 16 receives. Each call to jk_tcp_socket_recvfull() returns data, but it takes more than 16 loops to get a JK_SOCKET_EOF. Apache is using 30 for MAX_SECS_TO_LINGER. Any objection why mod_jk cannot use the same value?
Thanks, --JJ >>> [EMAIL PROTECTED] 5/20/2005 12:21 PM >>> Jean-Jacques Clar wrote: > Hi, > > file: jk_connect.c > in jk_shutdown_socket(); when reading data from tomcat in the while loop, > the variable ttl is incremented every time by one, until breaking out of the > loop: > snippet: > line 505 *------------------------- > /* Read all data from the peer until we reach "end-of-file" (FIN > * from peer) or we've exceeded our overall timeout. If the client does > * not send us bytes within12 second, close the connection. > */ > while (1) { > nbytes = jk_tcp_socket_recvfull(s, dummy, sizeof(dummy)); > if (nbytes <= 0) > break; > ttl += SECONDS_TO_LINGER; > if (ttl > MAX_SECS_TO_LINGER) > break; > > } The problem is because I do not have a Netware box. You guys can try to enable the following: #if defined(WIN32) setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (const char *) &tmout, sizeof(int)); #endif for Netware too... I didn't try to enable that because so many times the JK has been broken because of Netware build bugs ;) Also the code in nb_connect: #if defined(WIN32) int tmout = timeout * 1000; setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (const char *) &tmout, sizeof(int)); setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, (const char *) &tmout, sizeof(int)); #else ... Shuld be checked for: (probably but who knows ;) for : #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__)) Regards, Mladen --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]