airavata-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Supun Nakandala <supun.nakand...@gmail.com>
Subject Re: Registry JPA concurrency issue
Date Tue, 17 May 2016 14:14:02 GMT
Thanks Chathuri. Will look into that.

On Tue, May 17, 2016 at 9:43 AM, Chathuri Wimalasena <kamalasini@gmail.com>
wrote:

> Hi Supun,
>
> I remember we had the same issue before. As I remember it is not recommend
> to enable that property. Instead we have to check any open entity managers
> are there.  After every transaction, we need to close the existing entity
> manager. If we added new JPA classes, can you check whether we did it
> correctly.
>
> Regards,
> Chathuri
>
> On Mon, May 16, 2016 at 5:34 PM, Supun Nakandala <
> supun.nakandala@gmail.com> wrote:
>
>> Fixed the issue by adding the openjpa.Multithreaded = true in JPA
>> configuration
>>
>> On Mon, May 16, 2016 at 5:14 PM, Supun Nakandala <
>> supun.nakandala@gmail.com> 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
>>
>
>


-- 
Thank you
Supun Nakandala
Dept. Computer Science and Engineering
University of Moratuwa

Mime
View raw message