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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.5.4
    • Fix Version/s: 1.6.2, 1.7.0
    • Component/s: adb
    • Labels:
      None
    • Environment:
      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.

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

        Issue Links

          Activity

          Andreas Veithen made changes -
          Assignee Andreas Veithen [ veithen ]
          Andreas Veithen made changes -
          Link This issue is duplicated by AXIS2-5119 [ AXIS2-5119 ]
          Andreas Veithen made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.6.2 [ 12317875 ]
          Fix Version/s 1.7.0 [ 12316136 ]
          Resolution Duplicate [ 3 ]
          Andreas Veithen made changes -
          Link This issue duplicates AXIS2-4524 [ AXIS2-4524 ]
          Andreas Veithen made changes -
          Link This issue duplicates AXIS2-4878 [ AXIS2-4878 ]
          Ronald Brindl made changes -
          Field Original Value New Value
          Attachment BeanInfoCache.java [ 12490114 ]
          Attachment BeanUtil.java [ 12490115 ]
          Attachment BeanInfoCacheTest.java [ 12490116 ]
          Ronald Brindl created issue -

            People

            • Assignee:
              Andreas Veithen
              Reporter:
              Ronald Brindl
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development