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

poor performance from snapshot removal tasks rebuilding maven metadata

    XMLWordPrintable

    Details

      Description

      The nexus 3 snapshot remover does not scale to very large snapshot repositories. It runs very slowly, and can consume excessive amounts of heap space.

      The main cause is due to how maven metadata updates are being handled. A symptomatic thread may appear similar to:

      quartz-2-thread-19 id=2709 state=RUNNABLE
          at java.io.FileInputStream.open0(Native Method)
          at java.io.FileInputStream.open(FileInputStream.java:195)
          at java.io.FileInputStream.<init>(FileInputStream.java:138)
          at org.sonatype.nexus.common.property.PropertiesFile.load(PropertiesFile.java:47)
          at org.sonatype.nexus.blobstore.file.internal.BlobAttributes.load(BlobAttributes.java:90)
          at org.sonatype.nexus.blobstore.file.FileBlobStore.get(FileBlobStore.java:272)
          at org.sonatype.nexus.repository.storage.BlobTx.get(BlobTx.java:109)
          at org.sonatype.nexus.repository.storage.StorageTxImpl.getBlob(StorageTxImpl.java:700)
          at org.sonatype.nexus.repository.storage.StorageTxImpl.requireBlob(StorageTxImpl.java:706)
          at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53)
          at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
          at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270)
          at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
          at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:63)
          at com.sun.proxy.$Proxy161.requireBlob(Unknown Source)
          at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.get(MavenFacetImpl.java:182)
          at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl$$EnhancerByGuice$$db36e243.CGLIB$get$9(<generated>)
          at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl$$EnhancerByGuice$$db36e243$$FastClassByGuice$$cf0792f.invoke(<generated>)
          at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
          at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)
          at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:44)
          at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)
          at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)
          at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl$$EnhancerByGuice$$db36e243.get(<generated>)
          at org.sonatype.nexus.repository.maven.internal.hosted.metadata.MetadataRebuilder$Worker.mayUpdateChecksum(MetadataRebuilder.java:369)
          at org.sonatype.nexus.repository.maven.internal.hosted.metadata.MetadataRebuilder$Worker.lambda$2(MetadataRebuilder.java:328)
          at org.sonatype.nexus.repository.maven.internal.hosted.metadata.MetadataRebuilder$Worker$$Lambda$80/674311567.call(Unknown Source)
          at org.sonatype.nexus.transaction.Operations$1.proceed(Operations.java:138)
          at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:54)
          at org.sonatype.nexus.transaction.Operations.transactional(Operations.java:150)
          at org.sonatype.nexus.transaction.TransactionalBuilder.call(TransactionalBuilder.java:88)
          at org.sonatype.nexus.repository.maven.internal.hosted.metadata.MetadataRebuilder$Worker.rebuildMetadataInner(MetadataRebuilder.java:308)
          at org.sonatype.nexus.repository.maven.internal.hosted.metadata.MetadataRebuilder$Worker.rebuildMetadata(MetadataRebuilder.java:276)
          at org.sonatype.nexus.repository.maven.internal.hosted.metadata.MetadataRebuilder.rebuild(MetadataRebuilder.java:99)
          at org.sonatype.nexus.repository.maven.internal.hosted.metadata.MetadataRebuilder.deleteAndRebuild(MetadataRebuilder.java:152)
          at org.sonatype.nexus.repository.maven.internal.hosted.MavenHostedFacetImpl.deleteMetadata(MavenHostedFacetImpl.java:123)
          at org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl.removeSnapshots(RemoveSnapshotsFacetImpl.java:144)
          at org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl$$EnhancerByGuice$$d73cb776.CGLIB$removeSnapshots$1(<generated>)
          at org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl$$EnhancerByGuice$$d73cb776$$FastClassByGuice$$c136b79.invoke(<generated>)
          at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
          at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)
          at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
          at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270)
          at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
          at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)
          at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)
          at org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl$$EnhancerByGuice$$d73cb776.removeSnapshots(<generated>)
          at org.sonatype.nexus.repository.maven.tasks.RemoveSnapshotsTask.execute(RemoveSnapshotsTask.java:58)
          at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:56)
          at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:89)
          at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:141)
          at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:103)
          at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
          at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
          at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
          at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
      
          Locked synchronizers: count = 2
            - java.util.concurrent.locks.ReentrantLock$NonfairSync@671eeb52
            - java.util.concurrent.ThreadPoolExecutor$Worker@38b91569
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Peter Lynch
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title