AnsweredAssumed Answered

java heap space error when syncing with AD

Question asked by numan85 on Feb 3, 2011
Hello,

I saw multiple Java heap space error posts here but non of them seemed to do the trick for me. I'm not sure if i'm just trying too sync too many users and Alfresco can't handle it. I am running a VM with windows server 2003 64 bit, it has 8 gigs of ram, and a 150 gig hard drive and im running Alfresco 3.4c. Based on the logs, they sync gets to about 62% and then gives me the java heap space error. Please see below

16:18:17,842  INFO  [security.sync.ChainingUserRegistrySynchronizer] ssaAD User Creation and Association: Processed 14300 entries out of 23043. 62% complete. Rate: 5 per second. 11 failures detected.
Exception in thread "Store org.alfresco.cache.ticketsCache Spool Thread" java.lang.OutOfMemoryError: Java heap space
   at java.util.concurrent.ConcurrentHashMap.size(ConcurrentHashMap.java:718)
   at net.sf.ehcache.store.DiskStore.throwableSafeFlushSpoolIfRequired(DiskStore.java:702)
   at net.sf.ehcache.store.DiskStore.spoolAndExpiryThreadMain(DiskStore.java:675)
   at net.sf.ehcache.store.DiskStore.access$900(DiskStore.java:74)
   at net.sf.ehcache.store.DiskStore$SpoolAndExpiryThread.run(DiskStore.java:1170)
16:26:29,314  ERROR [post.lookup.PostLookup] Exception during update of posts
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:2882)
   at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
   at java.lang.StringBuffer.append(StringBuffer.java:224)
   at org.apache.commons.dbcp.PoolingConnection$PStmtKey.hashCode(PoolingConnection.java:301)
   at java.util.HashMap.get(HashMap.java:300)
   at org.apache.commons.pool.impl.GenericKeyedObjectPool.addObjectToPool(GenericKeyedObjectPool.java:1239)
   at org.apache.commons.pool.impl.GenericKeyedObjectPool.returnObject(GenericKeyedObjectPool.java:1199)
   at org.apache.commons.dbcp.PoolablePreparedStatement.close(PoolablePreparedStatement.java:79)
   at org.apache.commons.dbcp.DelegatingStatement.close(DelegatingStatement.java:168)
   at com.ibatis.sqlmap.engine.scope.SessionScope.closePreparedStatements(SessionScope.java:262)
   at com.ibatis.sqlmap.engine.transaction.TransactionManager.end(TransactionManager.java:92)
   at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelegate.java:734)
   at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSessionImpl.java:176)
   at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(SqlMapClientImpl.java:153)
   at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(SqlMapExecutorDelegate.java:835)
   at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:574)
   at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
   at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
   at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
   at org.alfresco.repo.domain.activities.ibatis.ActivityPostDAOImpl.selectPosts(ActivityPostDAOImpl.java:43)
   at org.alfresco.repo.activities.post.lookup.PostLookup.execute(PostLookup.java:130)
   at org.alfresco.repo.activities.post.lookup.PostLookupJob.execute(PostLookupJob.java:50)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

At the top of my Catalina.sh file i have JAVA_OPTS = "$JAVA_OPTS -Xms512m -Xmx3072m"

Am i doing something wrong or am I just trying to import too many users? Please help

Thanks in advance!

Outcomes