https://issues.apache.org/bugzilla/show_bug.cgi?id=46632
Summary: mod_jk's sockets close prematurely when the server forks a child Product: Tomcat Connectors Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: mod_jk AssignedTo: dev@tomcat.apache.org ReportedBy: jles...@placebase.com mod_jk registers its cleanup handler to be called both during plain_cleanup and child_cleanup: apr_pool_cleanup_register(p, s, jk_apr_pool_cleanup, jk_apr_pool_cleanup); So, whenever a server forks a child, ie, when mod_cgi creates its child process, jk_apr_pool_cleanup() gets called. jk_apr_pool_cleanup() does a shutdown() on its sockets, which closes down the socket for the parent process. Maybe it should use close() instead of shutdown(), or be registered as apr_pool_cleanup_register(p, s, jk_apr_pool_cleanup, jk_apr_pool_cleanup_null); ? Note, with mod_jk 1.2.18, a load balancing worker isn't able to recover from this, and it brings down the whole LB worker for awhile. 1.2.27 seems to be able to recover. After a CGI is hit and jk's sockets get closed underneath it, the logs look like: [Wed Jan 28 21:39:50 2009] [22841:42432] [info] ajp_send_request::jk_ajp_common.c (1178): Socket 75 is not connected any more (errno=-1) [Wed Jan 28 21:39:50 2009] [22841:42432] [info] ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try another pooled connection [Wed Jan 28 21:39:50 2009] [22841:42432] [info] ajp_send_request::jk_ajp_common.c (1224): All endpoints are disconnected or dead [Wed Jan 28 21:39:50 2009] [22841:42432] [info] ajp_service::jk_ajp_common.c (1783): Sending request to tomcat failed, recoverable operation attempt=1 -- 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