Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5118

In high load scenarios with many threads, the call to Introspector.getBeanInfo(Class,Class) causes high synchronization resulting in system stall

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.5.4
    • 1.6.2, 1.7.0
    • adb
    • None
    • Tomcat 7 with axis2 webservices

    Description

      I have a high load scenario, where a Clustered Web frontend does Webservice calls to a Backend Webservices.
      There are around 200 Threads handling the webservices.
      The CPU load of the machine went to near zero.
      Using dynatrace, we realized, that all the calls went through BeanUtils.getPropertyQnameList, which in turn calls Introspector.getBeanInfo(beanClass, beanClass.getSuperclass());
      This again calls WebAppClassLoader.loadClass(String name, boolean resolve), which is synchronized.

      I fixed this problem by modifying BeanUtil.getPropertyQnameList so that it caches BeanInfo objects.

      Attachments

        1. BeanInfoCache.java
          1 kB
          Ronald Brindl
        2. BeanUtil.java
          39 kB
          Ronald Brindl
        3. BeanInfoCacheTest.java
          2 kB
          Ronald Brindl

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            veithen Andreas Veithen
            rbrindl Ronald Brindl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment