Fixed the issue by adding the openjpa.Multithreaded = true in JPA configuration
On Mon, May 16, 2016 at 5:14 PM, Supun Nakandala <[email protected]> wrote: > Hi devs, > > I was trying to benchmark the recent API security implementation and ran > some performance test on the API. Basically I ran 1000 API requests using a > thread pool of 10 and encountered the following error in the registry. > > [ERROR] org.apache.airavata.registry.cpi.AppCatalogException: > org.apache.airavata.registry.cpi.AppCatalogException: > <openjpa-2.2.0-r422266:1244990 fatal general error> > org.apache.openjpa.persistence.PersistenceException: Multiple concurrent > threads attempted to access a single broker. By default brokers are not > thread safe; if you require and/or intend a broker to be accessed by more > than one thread, set the openjpa.Multithreaded property to true to override > the default behavior. > org.apache.airavata.registry.cpi.AppCatalogException: > org.apache.airavata.registry.cpi.AppCatalogException: > org.apache.airavata.registry.cpi.AppCatalogException: > <openjpa-2.2.0-r422266:1244990 fatal general error> > org.apache.openjpa.persistence.PersistenceException: Multiple concurrent > threads attempted to access a single broker. By default brokers are not > thread safe; if you require and/or intend a broker to be accessed by more > than one thread, set the openjpa.Multithreaded property to true to override > the default behavior. > at > org.apache.airavata.registry.core.app.catalog.impl.GwyResourceProfileImpl.getGatewayProfile(GwyResourceProfileImpl.java:174) > at > org.apache.airavata.api.server.security.DefaultAiravataSecurityManager.isUserAuthorized(DefaultAiravataSecurityManager.java:210) > at > org.apache.airavata.api.server.security.interceptor.SecurityInterceptor.authorize(SecurityInterceptor.java:68) > at > org.apache.airavata.api.server.security.interceptor.SecurityInterceptor.invoke(SecurityInterceptor.java:53) > at > com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75) > at > com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55) > at > org.apache.airavata.api.server.handler.AiravataServerHandler$$EnhancerByGuice$$e23e9d11.getAPIVersion(<generated>) > at > org.apache.airavata.api.Airavata$Processor$getAPIVersion.getResult(Airavata.java:14029) > at > org.apache.airavata.api.Airavata$Processor$getAPIVersion.getResult(Airavata.java:14013) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) > at > org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > > does anyone has insight on the above issue? > -- Thank you Supun Nakandala Dept. Computer Science and Engineering University of Moratuwa
