https://issues.apache.org/bugzilla/show_bug.cgi?id=50839
Summary: Closing connection on the client side (browser) during unfinished transmission result in 100% CPU slike for 30 sec during socket shutdownd in jk_connect.c Product: Tomcat Connectors Version: unspecified Platform: PC OS/Version: Windows 2000 Status: NEW Severity: major Priority: P2 Component: isapi AssignedTo: dev@tomcat.apache.org ReportedBy: serhiy_holodn...@adp.com Configuration: Windows 2000 server SP4 IIS 5 Tomcat 6.0.26 JK connector 1.2.31.0 All components are on the same server. During research an issue why once in a while Tomcat on our servers starts rejecting connection on port for JK connector with error 61, we noticed that looks like it is starting with multiple 10054 errors recorded by JK connector during our regression testing. Last one could be easily reproduced on all our servers where it is installed. Error entry follows by spike in CPU utilization for 30 seconds during attempt to shutdown a socket (reporting large negative or positive number of lingering bytes read). Here the snapshot from JK connector logs during these events: [Sat Feb 26 19:22:19.979 2011] [2856:1508] [debug] isapi_write_client::jk_isapi_plugin.c (1204): Writing 2057 bytes of data to client [Sat Feb 26 19:22:19.979 2011] [2856:1508] [error] isapi_write_client::jk_isapi_plugin.c (1210): WriteClient failed with 10054 (0x00002746) [Sat Feb 26 19:22:19.979 2011] [2856:1508] [info] ajp_process_callback::jk_ajp_common.c (1885): Writing to client aborted or client network problems [Sat Feb 26 19:22:19.979 2011] [2856:1508] [info] ajp_service::jk_ajp_common.c (2543): (worker1) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Sat Feb 26 19:22:19.979 2011] [2856:1508] [info] HttpExtensionProc::jk_isapi_plugin.c (2217): service() failed because client aborted connection [Sat Feb 26 19:22:19.979 2011] [2856:1508] [debug] ajp_reset_endpoint::jk_ajp_common.c (757): (worker1) resetting endpoint with socket 2776 (socket shutdown) [Sat Feb 26 19:22:19.979 2011] [2856:1508] [debug] jk_shutdown_socket::jk_connect.c (726): About to shutdown socket 2776 [127.0.0.1:2755 -> 127.0.0.1:8109] [Sat Feb 26 19:22:49.010 2011] [2856:1508] [debug] jk_shutdown_socket::jk_connect.c (808): Shutdown socket 2776 [127.0.0.1:2755 -> 127.0.0.1:8109] and read 1402725467 lingering bytes in 30 sec. Other things noted: - download speed between webserver and client browser is about 60-80 Kb/sec when JK is used. Content served by IIS or Tomcat directly delivered with about 2Mb/sec. - changing packet size (connector and tomcat) from default to 32K didn't make a difference. - Configure JK2 connector instead of JK (same box, same everything) - no issues whatsoever (no CPU spikes, no download speed issues). All values in server.xml and workers.properties are pretty much at default values, but below is our workers.properties, just in case: ------------------------------------ worker.list=worker1,worker2,worker3 worker.worker1.host=localhost worker.worker1.port=8109 worker.worker1.type=ajp13 worker.worker2.host=localhost worker.worker2.port=8209 worker.worker2.type=ajp13 worker.worker3.host=localhost worker.worker3.port=8309 worker.worker3.type=ajp13 ------------------------------------ and workers2.properties --------------------------------------------- [shm:] file=${serverRoot}\work\jk2.shm size=1048576 # add this section to test the proposition that it resolved the upload bug [logger] level=DEBUG [logger.file:0] file=D:\jk2logs\jk2.log debug=1 # Define the communication channel [channel.socket:127.0.0.1:8109] info=Ajp13 forwarding over socket tomcatId=127.0.0.1:8109 # Map the Tomcat examples webapp to the Web server uri space [uri:/*.jsp] [uri:/*.jsf] [uri:/*.faces] [uri:/*.class] [uri:/*download.pdf] [uri:/*testServ] [uri:/*TimerServlet] ------------------------------------ Here the section from server.xml regarding AJP: --------------------- <!-- Define an AJP 1.3 Connector on port 8109 --> <Connector port="8109" protocol="AJP/1.3" redirectPort="8443" /> --------------------- Please let me know if more information is needed. Thanks, Serhiy -- 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