By default, Tomcat and mod_jk leave the Sockets open between them indefinitely. The usual way to work around this is to configure a connectionTimeout in the <Connector /> element, and possibly enable cping/cpong on the Apache side. In any case, Tomcat doesn't expose the socket to the webapp, so there isn't really anything you can do in your app programatically.
Otherwise, pretty much what Giancarlo said :) "James Johnson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a Spring based application that is running in Tomcat 5.5.12. Tomcat > is integrated with Apache. Apache host JavaScript client side code that > makes Http asynchronous calls to the Spring based application. I'm getting > an error reported from Apache as follows: > > Too many open files: apr_accept: (client socket) > > There is speculation that the resources being used in the Spring based > app. > are not being properly cleaned up. More specifically, the > HttpServletRequest > and HttpServletResponse objects are leaving streams and sockets open on > the > Apache server. Should I be explicitly closing streams and sockets of the > HttpServletRequest and HttpServletReponse objects? If so, how would this > be > done? Or does tomcat handle this? > > Here's an example of what is currently is done. > > public class Something implements Controller { > > public ModelAndView handleRequest(HttpServletRequest request, > HttpServletResponse response) throws ServletException, IOException { > //read something from request > doSomething(); > return null; > } > } > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]