Tried switching from "org.eclipse.jetty.server.bio.SocketConnector" to
"org.eclipse.jetty.server.nio.SelectChannelConnector"
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<Call class="java.lang.System" name="setProperty">
<Arg>log4j.configuration</Arg> <Arg>etc/log4j.properties</Arg> </Call>
<Set name="host"><SystemProperty name="jetty.host" /></Set>
<Set name="port"><SystemProperty name="jetty.port"
default="8983"/></Set>
<Set name="maxIdleTime">50000</Set>
<Set name="Acceptors">2</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
<Set name="lowResourcesConnections">5000</Set>
<Set name="lowResourcesMaxIdleTime">5000</Set>
</New>
</Arg>
</Call>
And the problem seems to disappear - with the above connector-config I
consistently get 2 secs response-time.
It is just that Solr seems to recommend
org.eclipse.jetty.server.bio.SocketConnector
http://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x/solr/example/etc/jetty.xml
(where they build 4.x releases)
http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/example/etc/jetty.xml
(planed for future 5.x releases)
Regards, Per Steffensen
On 10/05/14 16:35, Per Steffensen wrote:
Hi
Jetty 8.1.10-v20130312
I am running Solr (4.4.0) in my Jetty - sending requests from clients
through CloudSolrServer (4.4.0) which uses Apache HttpClient 4.2.3.
Using jetty.xml below. I am doing kinda similar requests all the time
- responding in about 2 secs. But for many of the requests the
response-time is about 52 secs. If I change maxIdleTimeout in the
jetty.xml below to e.g. 20000 the "slow" requests start responding in
22 secs, so maxIdleTimeout definitely corresponds to the "delay". It
seems like, if requests has been fired recently, when I fire a new
request it is very rare that I see the 52/22 secs response-time on the
new request. But if it has been a while (like a minute or so) since
requests was last fired, the chance of getting the 52/22 response-time
is much higher. Lets call "running dummy requests regularly to keep
the time since last request low" for "keep it warm". Currently we do
"keep it warn", but this ought not to be necessary. It seems like two
clients can "keep it warm" for each other - if I set up a
keep-it-warm-client firing dummy requests regularly, the real client
firing real requests will almost never experience the 52/22
response-time problem. The keep-it-warm-client and the real-client can
be completely independent - does not have to run in the same JVM or
even on the same machine. Therefore I conclude that it is likely on
the receiving end of the request that something is going wrong - that
is in Jetty running Solr-server.
Any ideas about what is wrong? Any hits to what to look for when I
dive into figuring out the problem?
Regards, Per Steffensen
------- jetty.xml -----------------
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN"
"http://www.eclipse.org/jetty/configure.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Set name="ThreadPool">
<!-- Default queued blocking threadpool -->
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="minThreads">10</Set>
<Set name="maxThreads">10000</Set>
<Set name="detailedDump">false</Set>
</New>
</Set>
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.bio.SocketConnector">
<Call class="java.lang.System" name="setProperty">
<Arg>log4j.configuration</Arg> <Arg>etc/log4j.properties</Arg> </Call>
<Set name="host"><SystemProperty name="jetty.host" /></Set>
<Set name="port"><SystemProperty name="jetty.port"
default="8983"/></Set>
<Set name="maxIdleTime">50000</Set>
<Set name="lowResourceMaxIdleTime">1500</Set>
<Set name="statsOn">false</Set>
<Set name="requestHeaderSize">65535</Set>
</New>
</Arg>
</Call>
<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>
<Item>
<New id="RequestLog"
class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
</Item>
</Array>
</Set>
</New>
</Set>
<Set name="stopAtShutdown">true</Set>
<Set name="sendServerVersion">false</Set>
<Set name="sendDateHeader">false</Set>
<Set name="gracefulShutdown">1000</Set>
<Set name="dumpAfterStart">false</Set>
<Set name="dumpBeforeStop">false</Set>
<Call name="addBean">
<Arg>
<New id="DeploymentManager"
class="org.eclipse.jetty.deploy.DeploymentManager">
<Set name="contexts">
<Ref id="Contexts" />
</Set>
<Call name="setContextAttribute">
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
<Arg>.*/servlet-api-[^/]*\.jar$</Arg>
</Call>
</New>
</Arg>
</Call>
<Ref id="DeploymentManager">
<Call name="addAppProvider">
<Arg>
<New
class="org.eclipse.jetty.deploy.providers.ContextProvider">
<Set name="monitoredDirName"><SystemProperty
name="jetty.home" default="."/>/contexts</Set>
<Set name="scanInterval">0</Set>
</New>
</Arg>
</Call>
</Ref>
</Configure>
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users