Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-16565

IllegalStateException Insufficient configured threads from a docker repository connector configuration

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.8.0, 3.9.0, 3.10.0
    • Fix Version/s: 3.13.0
    • Component/s: Docker, Scalability
    • Labels:
    • Story Points:
      3

      Description

      Summary

      On saving a Docker repository configuration that has defined a port number, the nexus.log may contain a message such as this:

      WARN [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.jetty.ConnectorManager - Could not start connector: DockerConnectorConfiguration\{repositoryName=xxx-xxxx-docker, scheme=http, port=10059} java.lang.IllegalStateException: Insufficient configured threads: required=203 < max=200 for QueuedThreadPool@qtp915926290\{STARTED,8<=15<=
      

      This indicates that the pool of threads that Eclipse Jetty draws from to preallocate threads for the new connector is too small to meet the required total. The default pool size is 200 threads.

      When this error happens on saving Docker repository configuration, no other changes can be made to the Docker repository configuration.

      This error can also happen on Nexus startup, where each Docker repository connector is started.

      Nexus version 3.8.0+ is more likely to trigger this issue because in that version Eclipse Jetty was upgraded to 9.4.8 from 9.3.20, and the thread allocation strategy has changed slightly in that version.

      Nexus Repository Manager 3.8.0 Release Notes
      Eclipse Jetty 9.4.8 thread allocation

      Short Term Workaround

      You may be able to avoid the error by increasing the Jetty thread pool. Edit the configuration file (<nexus-app-dir>/etc/jetty/jetty.xml) and add a new maxThreads setter:

        <Arg name="threadpool">
          <New id="threadpool" class="org.sonatype.nexus.bootstrap.jetty.InstrumentedQueuedThreadPool">
            <Set name="maxThreads">400</Set>
          </New>
        </Arg>
      

      Caution: We suggest being conservative increasing the thread pool maxThreads - each new thread in the pool has the potential to increase workload inside of Nexus for concurrent request threads.

      Restart Nexus to pick up changes to the file. Startup will fail if this file contains invalid XML.

      Long Term Workaround

      Consider using a strategy where a reverse proxy in front of Nexus dynamically maps docker requests to Nexus Docker repositories. In this scenario, you will not need to specify port numbers and therefore new connectors, on your docker repos. Increasing the Jetty thread pool should not be required in this case:

      https://support.sonatype.com/hc/en-us/articles/360000761828

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Peter Lynch Peter Lynch
            Team:
            Nexus - Formats
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title