Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-70291

Project creation using shared config with Issue Scheme associated with large number of projects returned timeout error

XMLWordPrintable

      Summary

      • When creating a new project in the GUI or via REST with the shared configuration, the system 'hangs' about 20~50 seconds per active node in the cluster.
      • Then it runs into an error Request timeout when creating project.
      • The project is using an issue scheme that is attached to about 10k projects.
      • The project is created, just the propagation of the data needs so long.

      Environment

      • Jira Data Center 8.5.0

      Steps to Reproduce

      1. Create 10000 projects
      2. Create an Issue Scheme
      3. Click "Associate" in the newly created Issue scheme
      4. Select all projects and click Next
      5. Create a new project
      6. Select Create with shared configuration link under the project create a screen window.
      7. Select the Existing project from the list, which has been associated with the Issue scheme.
      8. Enter the project name and the Key and Submit.

      Expected Results

      • Project creation should be completed without any error in a reasonable time.

      Actual Results

      • After the submit button, it keeps loading and returning the error on the UI.
      • We could see the project has been created under the project list.

      Thread dumps show the following thread.

      "https-jsse-nio-8443-exec-11 url:/rest/project-t...createshared/65009 username:admin" #243 daemon prio=5 os_prio=0 tid=0x00007f01bc89f000 nid=0x4b1a runnable [0x00007f013e156000]
         java.lang.Thread.State: RUNNABLE
      	at java.io.RandomAccessFile.writeBytes(Native Method)
      	at java.io.RandomAccessFile.write(RandomAccessFile.java:512)
      	at com.squareup.tape.QueueFile.writeHeader(QueueFile.java:184)
      	at com.squareup.tape.QueueFile.add(QueueFile.java:321)
      	- locked <0x0000000545643288> (a com.squareup.tape.QueueFile)
      	at com.squareup.tape.FileObjectQueue.add(FileObjectQueue.java:46)
      	at com.atlassian.jira.cluster.distribution.localq.tape.TapeLocalQCacheOpQueue.add(TapeLocalQCacheOpQueue.java:151)
      	at com.atlassian.jira.cluster.distribution.localq.LocalQCacheOpQueueWithStats.add(LocalQCacheOpQueueWithStats.java:116)
      	at com.atlassian.jira.cluster.distribution.localq.LocalQCacheManager.addToQueue(LocalQCacheManager.java:372)
      	at com.atlassian.jira.cluster.distribution.localq.LocalQCacheManager.addToAllQueues(LocalQCacheManager.java:356)
      	at com.atlassian.jira.cluster.distribution.localq.LocalQCacheReplicator.replicateToQueue(LocalQCacheReplicator.java:85)
      	at com.atlassian.jira.cluster.distribution.localq.LocalQCacheReplicator.replicateRemovalNotification(LocalQCacheReplicator.java:71)
      	at com.atlassian.jira.cluster.cache.ehcache.AbstractJiraCacheReplicator.notifyElementRemoved(AbstractJiraCacheReplicator.java:78)
      	at net.sf.ehcache.event.RegisteredEventListeners.internalNotifyElementRemoved(RegisteredEventListeners.java:156)
      	at net.sf.ehcache.event.RegisteredEventListeners.notifyElementRemoved(RegisteredEventListeners.java:136)
      	at net.sf.ehcache.Cache.notifyRemoveInternalListeners(Cache.java:2449)
      	at net.sf.ehcache.Cache.removeInternal(Cache.java:2423)
      	at net.sf.ehcache.Cache.remove(Cache.java:2325)
      	at net.sf.ehcache.Cache.remove(Cache.java:2243)
      	at net.sf.ehcache.constructs.EhcacheDecoratorAdapter.remove(EhcacheDecoratorAdapter.java:155)
      	at com.atlassian.cache.ehcache.SynchronizedLoadingCacheDecorator.remove(SynchronizedLoadingCacheDecorator.java:62)
      	at net.sf.ehcache.constructs.EhcacheDecoratorAdapter.remove(EhcacheDecoratorAdapter.java:155)
      	at com.atlassian.cache.ehcache.LoadingCache.remove(LoadingCache.java:194)
      	at com.atlassian.cache.ehcache.DelegatingCachedReference.reset(DelegatingCachedReference.java:90)
      	at com.atlassian.jira.cache.DeferredReplicationCachedReference.lambda$reset$0(DeferredReplicationCachedReference.java:34)
      	at com.atlassian.jira.cache.DeferredReplicationCachedReference$$Lambda$222/1517145153.get(Unknown Source)
      	at com.atlassian.jira.cluster.cache.ehcache.BlockingParallelCacheReplicator.runDeferred(BlockingParallelCacheReplicator.java:172)
      	at com.atlassian.jira.cache.DeferredReplicationCachedReference.reset(DeferredReplicationCachedReference.java:33)
      	at com.atlassian.jira.issue.context.persistence.FieldConfigContextPersisterWorker.invalidateAll(FieldConfigContextPersisterWorker.java:120)
      	at com.atlassian.jira.issue.context.persistence.FieldConfigContextPersisterWorker.store(FieldConfigContextPersisterWorker.java:107)
      	at com.atlassian.jira.issue.context.persistence.CachingFieldConfigContextPersister.store(CachingFieldConfigContextPersister.java:180)
      	at com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl.storeAssociatedContexts(FieldConfigSchemeManagerImpl.java:253)
      	at com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl.updateFieldConfigScheme(FieldConfigSchemeManagerImpl.java:156)
      	at com.atlassian.jira.bc.project.ProjectSchemeAssociationManager.lambda$associateIssueTypeScheme$7(ProjectSchemeAssociationManager.java:95)
      	at com.atlassian.jira.bc.project.ProjectSchemeAssociationManager$$Lambda$4072/2102011426.accept(Unknown Source)
      	at java.util.Optional.ifPresent(Optional.java:159)
      	at com.atlassian.jira.bc.project.ProjectSchemeAssociationManager.associateIssueTypeScheme(ProjectSchemeAssociationManager.java:90)
      	at com.atlassian.jira.bc.project.ProjectSchemeAssociationManager.associateSchemesOfExistingProjectWithNewProject(ProjectSchemeAssociationManager.java:73)
      	at com.atlassian.jira.bc.project.DefaultProjectService.lambda$createProject$2(DefaultProjectService.java:342)
      	at com.atlassian.jira.bc.project.DefaultProjectService$$Lambda$4066/698687704.accept(Unknown Source)
      	at com.atlassian.jira.bc.project.DefaultProjectService.createProjectInternal(DefaultProjectService.java:372)
      	at com.atlassian.jira.bc.project.DefaultProjectService.createProject(DefaultProjectService.java:347)
      	at sun.reflect.GeneratedMethodAccessor4742.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      	at com.sun.proxy.$Proxy508.createProject(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor4742.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:131)
      	at com.sun.proxy.$Proxy508.createProject(Unknown Source)
      	at com.atlassian.jira.projecttemplates.rest.CreateSharedProjectResource.createSharedProject(CreateSharedProjectResource.java:76)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192)
      	at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:83)
      	at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53)
      	at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:41)
      	at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53)
      	at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:110)
      	at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker._dispatch(DispatchProviderHelper.java:190)
      	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
      	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
      ...
      

      Workaround

      No

              Unassigned Unassigned
              allewellyn@atlassian.com Alex [Atlassian,PSE]
              Votes:
              27 Vote for this issue
              Watchers:
              28 Start watching this issue

                Created:
                Updated: