Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-6545

ServerInfoResource should attempt to cache ServiceConfigs per realm rather than creating one on each request

    Details

    • Sprint:
      Sustaining Sprint 10
    • Support Ticket IDs:

      Description

      During the investigation of a performance issue it was observed that ServerInfoResource.getServiceConfig() was constructing a ServiceConfigManager on each invocation which under heavy loads can lead to blocked threads in ServiceConfigImpl

      "http-bio-8080-exec-124" daemon prio=5 tid=0x00007fd4648a0800 nid=0x2c603 waiting for monitor entry [0x000000012cca5000]
         java.lang.Thread.State: BLOCKED (on object monitor)
      	at java.util.Collections$SynchronizedMap.get(Collections.java:2037)
      	- waiting to lock <0x00000007c2942d30> (a java.util.Collections$SynchronizedMap)
      	at com.sun.identity.sm.ServiceConfigImpl.getFromCache(ServiceConfigImpl.java:600)
      	at com.sun.identity.sm.ServiceConfigImpl.getInstance(ServiceConfigImpl.java:486)
      	at com.sun.identity.sm.ServiceConfigImpl.getInstance(ServiceConfigImpl.java:464)
      	at com.sun.identity.sm.ServiceConfigManagerImpl.getOrganizationConfig(ServiceConfigManagerImpl.java:254)
      	at com.sun.identity.sm.ServiceConfigManager.getOrganizationConfig(ServiceConfigManager.java:277)
      	at org.forgerock.openam.forgerockrest.server.ServerInfoResource.getServiceConfig(ServerInfoResource.java:235)
      

      Caching the ServerConfig per realm is one approach to solving the problem.

        Attachments

          Activity

            People

            • Assignee:
              markdr Mark de Reeper
              Reporter:
              markdr Mark de Reeper
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0h
                0h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 8h
                8h