Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-9382

Set Jetty minThreads, maxThreads, and idleTimeout

    XMLWordPrintable

Details

    • Story
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      At the moment, we do not provide a way to override PAX Web Jetty's minThreads, maxThreads, and idleTimeout. If you look at conf/jetty.xml, you will see a commented out block of thread-related settings, but if you uncomment, you will see an error in the logs:

      WARNING: Ignored arg: <Arg name="threadpool">
              <New class="org.eclipse.jetty.util.thread.QueuedThreadPool"><Arg name="minThreads">
      ...
      

      The solution is to add the following to config.properties.

      # Jetty maxThreads (default 200)
      org.ops4j.pax.web.server.maxThreads=${org.ops4j.pax.web.server.maxThreads}
      # Jetty minThreads (default 8)
      org.ops4j.pax.web.server.minThreads=${org.ops4j.pax.web.server.minThreads}
      # Jetty idle-thread timeout milliseconds (default 60000)
      org.ops4j.pax.web.server.idleTimeout=${org.ops4j.pax.web.server.idleTimeout}
      

      To override the defaults, you simply set a Java System Property during startup of OpenIDM, such as:

      JAVA_OPTS="-Dorg.ops4j.pax.web.server.maxThreads=768" ./openidm/startup.sh
      

      There are probably other ways to set the system property too. Property substitution will NOT work for these properties.

      Attachments

        Issue Links

          Activity

            People

              brmiller Brendan Miller
              travis.haagen Travis Haagen [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: