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

Performance issue with "Download cataloged versions only" and "Download policy compliant versions" options

    Details

    • Story Points:
      3
    • Sprint:
      NXRM Immortals Sprint 35, NXRM Immortals Sprint 36, NXRM Neo Sprint 39
    • Notability:
      2
    • InvestmentLayer:
      support-escalated
    • Aha Concept:
      non-concept

      Description

      SYMPTOM:

      With very large & busy Nexus instance, after enabling "Download cataloged versions only", users reported 502 HTTP status error, connection reset by peers, socket timeouts, proxy error etc.
      The thread dumps show a few hundreds of threads are blocked by one thread, and it looks like only one RUNNABLE is allowed to communicate with IQ from the nonCatalogedVersions() method.

      Example of RUNNABLE thread:

      "qtp557457095-2508" #2508 prio=5 os_prio=0 tid=0x00007f59a401b800 nid=0xa80e runnable [0x00007f4b8bbb5000]
         java.lang.Thread.State: RUNNABLE
      	at java.net.SocketInputStream.socketRead0(Native Method)
      ... (snip) ...
      	- locked <0x00000003f7d1b1e0> (a com.google.common.eventbus.Subscriber$SynchronizedSubscriber)
      	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72)
      	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
      	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:67)
      	at com.google.common.eventbus.Dispatcher$ImmediateDispatcher.dispatch(Dispatcher.java:186)
      	at com.google.common.eventbus.EventBus.post(EventBus.java:212)
      	at org.sonatype.nexus.internal.event.EventManagerImpl.post(EventManagerImpl.java:127)
      	at com.sonatype.nexus.repository.npm.internal.orient.OrientNonCatalogedVersionHelperFacet.nonCatalogedVersions(OrientNonCatalogedVersionHelperFacet.java:206)
      	at com.sonatype.nexus.repository.npm.internal.orient.OrientNonCatalogedVersionHelperFacet.maybeAddExcludedVersionsFieldMatchers(OrientNonCatalogedVersionHelperFacet.java:155)
      ... (snip) ...
      

      REPRODUCE STEPS:

      At this moment, no clear reproduce steps available, but this symptom would happen with busy Nexus instance (for example, many npm concurrent requests + relatively slow IQ).

      EXPECTED BEHAVIOUR:

      org.sonatype.nexus.internal.event.EventManagerImpl.post may need some improvement.
      Ideally, removeNonCataloged and removeQuarantinedVersions options should work with the large Nexus instance but without spamming the IQ side (for example, utilising some cache).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mkearns Michael Kearns
              Reporter:
              hosako Hajime Osako
              Last Updated By:
              Nicholas Blair Nicholas Blair
              Team:
              NXRM - Neo
              Owner:
              Michael Kearns Michael Kearns
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title