Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-4659

Stash performance degrades over time with Java 1.7.0_51

    XMLWordPrintable

Details

    Description

      This is related to Spring 4.0.0.RELEASE which was introduced in Stash 2.11.0. This only affects newer versions of Java 1.7.0_51 and greater.

      https://jira.spring.io/browse/SPR-11335

      Diagnose

      Taking a thread dump will most likely show many threads being stuck in Spring AOP:

      "http-bio-127.0.0.1-7990-exec-5" daemon prio=10 tid=0x00007f510c009800 nid=0x2456 runnable [0x00007f50768e2000]
         java.lang.Thread.State: RUNNABLE
          at org.springframework.core.SerializableTypeWrapper$TypeProxyInvocationHandler.invoke(SerializableTypeWrapper.java:220)
          at com.sun.proxy.$Proxy25.equals(Unknown Source)
          at org.springframework.util.ObjectUtils.nullSafeEquals(ObjectUtils.java:252)
          at org.springframework.core.ResolvableType.equals(ResolvableType.java:681)
      

      If profiling is enabled a clear indication is very slow getById() calls:

      [3914ms] - "GET /rest/api/latest/profile/recent/repos HTTP/1.1"
         [1128ms] - Repository com.atlassian.stash.repository.RepositoryService.getById(int)
          [0ms] - Object com.atlassian.stash.internal.Dao.getById(Object)
        [1640ms] - Repository com.atlassian.stash.repository.RepositoryService.getById(int)
          [0ms] - Object com.atlassian.stash.internal.Dao.getById(Object)
        [853ms] - Repository com.atlassian.stash.repository.RepositoryService.getById(int)
          [0ms] - Object com.atlassian.stash.internal.Dao.getById(Object)
      

      Attachments

        Issue Links

          Activity

            People

              cofarrell CharlesA
              cofarrell CharlesA
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: