Increasing Jetty ThreadPool size in Karaf

微笑、不失礼 提交于 2019-12-11 03:24:36

问题


Trying to increase the number of threads in embedded jetty running in karaf .Im changing the jetty.xml with the following properties as described in the POST .

<Configure class="org.eclipse.jetty.server.Server">   
  <Call name="addConnector">
    <Arg>
      <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
        <Set name="minThreads">10</Set>
        <Set name="maxThreads">1000</Set>
      </New>
    </Arg> 
  </Call>
</Configure>

And also having org.ops4j.pax.web.cfg file in karaf ,with below properties :

   org.ops4j.pax.web.config.file=${karaf.home}/jetty.xml

so to refer the external configurations (Jetty). But Im not able to increase/decrease the default thread size of the server . So What am I missing ?


回答1:


With the latest Pax-Web 4.2.0 it's possible to configure those settings via configuration admin. The following three new settings can be used:

org.ops4j.pax.web.server.maxThreads
org.ops4j.pax.web.server.minThreads
org.ops4j.pax.web.server.idleTimeout


来源:https://stackoverflow.com/questions/31473460/increasing-jetty-threadpool-size-in-karaf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!