[jetty-user] delay in the request

JuanPabloGárbora <[email protected]> Wed, 5 Dec 2012 16:26:53 -0200
Newsgroups gmane.comp.java.jetty.support
Message-ID <CANjeYGv631qu9AFk+yTNVsRb28ay2kLicmMe5Rr8fKDCxRObQw@mail.gmail.com>
--047d7b62226e9a7e1204d01f21e9
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I have an java app with jetty embedded.

<dependency>
<groupId>org.mortbay.jetty</groupId>
 <artifactId>jetty</artifactId>
<version>6.1.26</version>
</dependency>

I have running 10 different instance of these app in one server, the server
is a vm at rackspace with 4 CPU + 8GB of memory.

My problem is some http request are getting delay ... like arround 5
minutes. I don't known if jetty put these request in some queue and then
release them or what !

Maybe there are too many instances of my app or the jetty server is not
well tunned.

any ideas ?

this is my configuration for the server.

<bean id="server.Server" class="org.mortbay.jetty.Server"
destroy-method="stop" init-method="start">
 <property name="threadPool">
<bean class="org.mortbay.thread.QueuedThreadPool">
 <property name="maxThreads" value="500" />
<property name="minThreads" value="10" />
 <property name="lowThreads" value="20" />
</bean>
 </property>
 <property name="connectors">
 <list>
<bean class="org.mortbay.jetty.nio.SelectChannelConnector">
 <property name="name" value="xyz" />
<property name="port" value="${server.ws.port}" />
 <property name="maxIdleTime" value="60000" />
<property name="acceptors" value="2" />
 <property name="statsOn" value="false" />
</bean>
 </list>
</property>
<property name="handlers">
 <list>
<bean class="org.mortbay.jetty.webapp.WebAppContext">
 <constructor-arg value="conf" />
<constructor-arg value="/" />
 </bean>
</list>
</property>
 <property name="stopAtShutdown" value="true" />
<property name="sendServerVersion" value="true" />
 </bean>

best regards,

--047d7b62226e9a7e1204d01f21e9
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,=A0<div><br></div><div>I have an java app with jetty embedded.</div><div=
><br></div><div><div>&lt;dependency&gt;</div><div><span class=3D"Apple-tab-=
span" style=3D"white-space:pre">	</span>&lt;groupId&gt;org.mortbay.jetty&lt=
;/groupId&gt;</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>&lt;a=
rtifactId&gt;jetty&lt;/artifactId&gt;</div><div><span class=3D"Apple-tab-sp=
an" style=3D"white-space:pre">	</span>&lt;version&gt;6.1.26&lt;/version&gt;=
</div>

<div>&lt;/dependency&gt;</div></div><div><br></div><div>I have running 10 d=
ifferent instance of these app in one server, the server is a vm at rackspa=
ce with 4 CPU + 8GB of memory.=A0</div><div><br></div><div>My problem is so=
me http request are getting delay ... like arround 5 minutes. I don&#39;t k=
nown if jetty put these request in some queue and then release them or what=
 !=A0</div>

<div><br></div><div>Maybe there are too many instances of my app or the jet=
ty server is not well tunned.=A0</div><div><br></div><div>any ideas ?</div>=
<div><br class=3D"Apple-interchange-newline">this is my configuration for t=
he server.=A0</div>

<div><br></div><div><div><span class=3D"Apple-tab-span" style=3D"white-spac=
e:pre">	</span>&lt;bean id=3D&quot;server.Server&quot; class=3D&quot;org.mo=
rtbay.jetty.Server&quot;</div><div><span class=3D"Apple-tab-span" style=3D"=
white-space:pre">		</span>destroy-method=3D&quot;stop&quot; init-method=3D&=
quot;start&quot;&gt;</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">		</span></di=
v><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">		</span>&l=
t;property name=3D&quot;threadPool&quot;&gt;</div><div><span class=3D"Apple=
-tab-span" style=3D"white-space:pre">			</span>&lt;bean class=3D&quot;org.m=
ortbay.thread.QueuedThreadPool&quot;&gt;</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">				</span>&l=
t;property name=3D&quot;maxThreads&quot; value=3D&quot;500&quot; /&gt;</div=
><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">				</span>&=
lt;property name=3D&quot;minThreads&quot; value=3D&quot;10&quot; /&gt;</div=
>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">				</span>&l=
t;property name=3D&quot;lowThreads&quot; value=3D&quot;20&quot; /&gt;</div>=
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">			</span>&lt=
;/bean&gt;</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">		</span>&lt;=
/property&gt;</div><div><span class=3D"Apple-tab-span" style=3D"white-space=
:pre">	</span></div><div><span class=3D"Apple-tab-span" style=3D"white-spac=
e:pre">		</span>&lt;property name=3D&quot;connectors&quot;&gt;</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">			</span>&lt=
;list&gt;</div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre=
">				</span>&lt;bean class=3D&quot;org.mortbay.jetty.nio.SelectChannelConn=
ector&quot;&gt;</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">					</span>&=
lt;property name=3D&quot;name&quot; value=3D&quot;xyz&quot; /&gt;</div><div=
><span class=3D"Apple-tab-span" style=3D"white-space:pre">					</span>&lt;p=
roperty name=3D&quot;port&quot; value=3D&quot;${server.ws.port}&quot; /&gt;=
</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">					</span>&=
lt;property name=3D&quot;maxIdleTime&quot; value=3D&quot;60000&quot; /&gt;<=
/div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">					</s=
pan>&lt;property name=3D&quot;acceptors&quot; value=3D&quot;2&quot; /&gt;</=
div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">					</span>&=
lt;property name=3D&quot;statsOn&quot; value=3D&quot;false&quot; /&gt;</div=
><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">				</span>&=
lt;/bean&gt;</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">			</span>&lt=
;/list&gt;</div><div><span class=3D"Apple-tab-span" style=3D"white-space:pr=
e">		</span>&lt;/property&gt;</div><div><span class=3D"Apple-tab-span" styl=
e=3D"white-space:pre">		</span>&lt;property name=3D&quot;handlers&quot;&gt;=
</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">			</span>&lt=
;list&gt;</div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre=
">				</span>&lt;bean class=3D&quot;org.mortbay.jetty.webapp.WebAppContext&=
quot;&gt;</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">					</span>&=
lt;constructor-arg value=3D&quot;conf&quot; /&gt;</div><div><span class=3D"=
Apple-tab-span" style=3D"white-space:pre">					</span>&lt;constructor-arg v=
alue=3D&quot;/&quot; /&gt;</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">				</span>&l=
t;/bean&gt;</div><div><span class=3D"Apple-tab-span" style=3D"white-space:p=
re">			</span>&lt;/list&gt;</div><div><span class=3D"Apple-tab-span" style=
=3D"white-space:pre">		</span>&lt;/property&gt;</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">		</span>&lt;=
property name=3D&quot;stopAtShutdown&quot; value=3D&quot;true&quot; /&gt;</=
div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">		</span>=
&lt;property name=3D&quot;sendServerVersion&quot; value=3D&quot;true&quot; =
/&gt;</div>

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>&lt;/=
bean&gt;</div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre"=
>	</span></div></div><div><br></div><div>best regards,=A0</div>

--047d7b62226e9a7e1204d01f21e9--