openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject AW: Slice: OutOfMemoryError shortly after pounding 1000+ threads to the system.
Date Tue, 04 May 2010 12:26:30 GMT
which VM are you running? 32 bit or 64 bit? Because each thread you start eats up memory -
even if it doesn't use it.

LieGrue,
strub



----- Urspr√ľngliche Mail ----
> Von: ssso <simonso@yahoo.com>
> An: users@openjpa.apache.org
> Gesendet: Dienstag, den 4. Mai 2010, 1:42:40 Uhr
> Betreff: Slice: OutOfMemoryError shortly after pounding 1000+ threads to the system.
> 
> 
I have a very simple spring web app, inserting an order into the 
> database.

After pounding 500+ threads or so, I got an 
> OutOfMemoryError:

java.lang.OutOfMemoryError: unable to create new native 
> thread
        at java.lang.Thread.start0(Native 
> Method)
        at 
> java.lang.Thread.start(Thread.java:597)
        
> at
java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:703)
  
>       
> at
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:652)
  
>       
> at
java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:92)
  
>       
> at
org.apache.openjpa.slice.jdbc.DistributedJDBCStoreManager.flush(DistributedJDBCStoreManager.java:290)
  
>       
> at
org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
  
>       at 
> org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
  
>       
> at
org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
  
>       
> at
org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
  
>       
> at
org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
  
>       at 
> org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
  
>       
> at
org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
  
>       
> at
org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:559)
  
>       
> at
org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:467)
  
>       
> at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
  
>       
> at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
  
>       
> at
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:375)
  
>       
> at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)
  
>       
> at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
  
>       
> at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
  
>       at $Proxy17.merge(Unknown Source)
      
>   
> at
com.shutterfly.sfweb.InsertController.handleRequest(InsertController.java:45)
  
>       
> at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
  
>       
> at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
  
>       
> at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
  
>       
> at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
  
>       
> at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
  
>       at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    
>     at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    
>     
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)


My 
> question about the DistributedJDBCStoreManager.flush().  Does it 
> really
have to create a thread pool every single time a row is 
> committed?  Also,
from the profiler it seems like the threads in the 
> pool are not necessarily
used.

Thanks,
Simon

-- 
View 
> this message in context: 
> href="http://openjpa.208410.n2.nabble.com/Slice-OutOfMemoryError-shortly-after-pounding-1000-threads-to-the-system-tp5000822p5000822.html"

> target=_blank 
> >http://openjpa.208410.n2.nabble.com/Slice-OutOfMemoryError-shortly-after-pounding-1000-threads-to-the-system-tp5000822p5000822.html
Sent 
> from the OpenJPA Users mailing list archive at Nabble.com.



Mime
View raw message