[jetty-user] Jetty Page not found with more connections!!

Carachi <[email protected]> Mon, 04 Jul 2011 10:10:35 +0200
Newsgroups gmane.comp.java.jetty.support
Message-ID <[email protected]>
Hello everybody,
I am new in Jetty and I try to build a handler, so I do this:

public static void main(String[] args) throws Exception
     {
         Server server = new Server(8080);
         server.setHandler(new TaskHandler());

         server.start();
         server.join();
     }

TaskHandler is a my class that reply with an xml.
The server works well if I have few connections (something like 10), but 
if I have more connections (something like 100), Jetty sometimes (about 
13%) response with:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body>
<h2>HTTP ERROR: 404</h2>
<p>Problem accessing /. Reason:
<pre>    Not Found</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>

This is my xml configuration file of Jetty:

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" 
"http://www.eclipse.org/jetty/configure.dtd">

<!-- =============================================================== -->
<!-- Configure the Jetty Server                                      -->
<!--                                                                 -->
<!-- Documentation of this file format can be found at:              -->
<!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax        -->
<!--                                                                 -->
<!-- Additional configuration files are available in $JETTY_HOME/etc -->
<!-- and can be mixed in.  For example:                              -->
<!--   java -jar start.jar etc/jetty-ssl.xml                         -->
<!--                                                                 -->
<!-- See start.ini file for the default configuraton files           -->
<!-- =============================================================== -->


<Configure id="Server" class="org.eclipse.jetty.server.Server">

<!-- =========================================================== -->
<!-- Server Thread Pool                                          -->
<!-- =========================================================== -->
<Set name="ThreadPool">
<!-- Default queued blocking threadpool -->
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="minThreads">1000</Set>
<Set name="maxThreads">20000</Set>
<Set name="detailedDump">false</Set>
</New>
</Set>


<!-- =========================================================== -->
<!-- Set connectors                                              -->
<!-- =========================================================== -->

<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<Set name="host"><Property name="jetty.host" /></Set>
<Set name="port"><Property name="jetty.port" default="8080"/></Set>
<Set name="maxIdleTime">300000</Set>
<Set name="Acceptors">2</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
<Set name="lowResourcesConnections">20000</Set>
<Set name="lowResourcesMaxIdleTime">5000</Set>
</New>
</Arg>
</Call>

<!-- =========================================================== -->
<!-- Set handler Collection Structure                            -->
<!-- =========================================================== -->
<Set name="handler">
<New id="Handlers" 
class="org.eclipse.jetty.server.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New id="Contexts" 
class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
</Item>
<Item>
<New id="DefaultHandler" 
class="org.eclipse.jetty.server.handler.DefaultHandler"/>
</Item>

</Array>
</Set>
</New>
</Set>


<!-- =========================================================== -->
<!-- extra options                                               -->
<!-- =========================================================== -->
<Set name="stopAtShutdown">true</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">true</Set>
<Set name="gracefulShutdown">1000</Set>
<Set name="dumpAfterStart">false</Set>
<Set name="dumpBeforeStop">false</Set>

</Configure>



Why?? How can I solve this problem??
How many connection Jetty supported?

Thank you