Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] direct connection to a proxy

The number of concurrent connections to Jetty is 1 in this particular case :)
The error message below is being thrown out after Jetty goes into some kind of infinite loop, apparently opening lots of file descriptors...

On Mon, Aug 31, 2009 at 4:09 AM, Jan Bartel <janb@xxxxxxxxxxx> wrote:
Alexander,

What's the number of open file descriptors that you have configured
for your operating system? Perhaps the number is set too low for the number of concurrent connections?

Jan

Alexander (Sasha) Sirotkin wrote:
I have application that uses ProxyServlet which works alright. However, direct connection to that proxy port kill it with the following exception

java.net.SocketException: Too many open files
Proxying localhost/
   at sun.nio.ch.Net.socket0(Native Method)
   at sun.nio.ch.Net.socket(Net.java:92)
   at sun.nio.ch.SocketChannelImpl.<init>(SocketChannelImpl.java:83)
   at sun.nio.ch.SelectorProviderImpl.openSocketChannel(SelectorProviderImpl.java:37)
   at java.nio.channels.SocketChannel.open(SocketChannel.java:105)
   at org.eclipse.jetty.client.SelectConnector.startConnection(SelectConnector.java:121)
   at org.eclipse.jetty.client.HttpDestination.startNewConnection(HttpDestination.java:244)
   at org.eclipse.jetty.client.HttpDestination.doSend(HttpDestination.java:476)
   at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:422)
   at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:148)
   at org.eclipse.jetty.servlets.ProxyServlet.service(ProxyServlet.java:341)
   at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:521)
   at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:436)
   at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:118)
   at org.eclipse.jetty.server.session.SessionHandler.handle(SessionHandler.java:179)
   at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:930)
   at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:371)
   at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:864)
   at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:116)
   at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:112)
   at org.eclipse.jetty.server.Server.handle(Server.java:337)
   at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:562)
   at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:986)
   at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:530)
   at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203)
   at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:415)
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:437)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:435)
   at java.lang.Thread.run(Thread.java:595)
2009-08-29 16:55:07.978:WARN::java.net.SocketException: Too many open files

Is that a bug ?

My code

       Server server = new Server(8080);
       ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
       context.setContextPath("/");
       server.setHandler(context);
       context.addServlet(new ServletHolder(new JettyScreenshotProxyServlet()), "/");
       server.start();
       server.join();


------------------------------------------------------------------------

_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev

--
Jan Bartel, Webtide LLC | janb@xxxxxxxxxxx | http://www.webtide.com
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top