cancel
Showing results for 
Search instead for 
Did you mean: 

WEBDAV and HEAP errors on 3.0Stable

pescha
Champ in-the-making
Champ in-the-making
Well,

I started over with 3.0stable hoping that my problems with getting this heap space to work would be fixed.

The installation on xp went smoothly and I was able to boot up alfresco.  I then set up a massive localhost webdav transfer, and after 15 min to half hour, I got my heap space "out of memory" errors. 

Here is my Alfresco.log

11:28:51,415 INFO  [org.alfresco.config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers.properties]
11:29:11,962 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
11:29:12,197 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\Alfresco\tomcat\temp\Alfresco\AlfrescoSchemaCreate-org.hibernate.dialect.MySQLInnoDBDialect-63968.sql (Generated).
11:29:25,775 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\Alfresco\tomcat\temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-63969.sql (Copied from classpath:alfresco/dbscripts/create/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoPostCreate-2.2-MappedFKIndexes.sql).
11:29:25,775 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\Alfresco\tomcat\temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-63970.sql (Copied from classpath:alfresco/dbscripts/create/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoPostCreate-2.2-Extra.sql).
11:29:27,275 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\Alfresco\tomcat\temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-63971.sql (Copied from classpath:alfresco/dbscripts/create/2.2/org.hibernate.dialect.MySQLInnoDBDialect/post-create-indexes-04.sql).
11:29:27,322 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\Alfresco\tomcat\temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-63972.sql (Copied from classpath:alfresco/dbscripts/create/3.0/org.hibernate.dialect.MySQLInnoDBDialect/create-activities-extras.sql).
11:29:27,743 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] All executed statements written to file C:\Alfresco\tomcat\temp\Alfresco\AlfrescoSchemaUpdate-All_Statements-63973.sql.
11:30:00,743 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: C:\Alfresco\alf_data
11:30:00,790 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
11:30:01,447 INFO  [org.alfresco.repo.admin.patch.PatchExecuter]    Applying patch 'patch.wcmFolders' (Ensures the existance of the WCM specific 'Web Projects' and 'Web Forms' folders.).
11:30:01,790 INFO  [org.alfresco.repo.admin.patch.PatchExecuter]
=== Applied patch                 ===
ID: patch.db-V3.0-0-CreateActivitiesExtras
RESULT:
Script completed
=====================================
11:30:01,790 INFO  [org.alfresco.repo.admin.patch.PatchExecuter]
=== Applied patch                 ===
ID: patch.wcmFolders
RESULT:
The Web Projects folder was successfully created: workspace://SpacesStore/4296ce40-da31-4f24-9aa6-65ca509a674a
The Web Forms folder was successfully created: workspace://SpacesStore/4296ce40-da31-4f24-9aa6-65ca509a674a
=====================================
11:30:01,790 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 0 module(s).
11:30:04,072 WARN  [org.alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.
11:30:04,103 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_07-b06; maximum heap size 506.313MB
11:30:04,103 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Labs): Current version 3.0.0 (Stable 1526) schema 1002 - Installed version 3.0.0 (Stable 1526) schema 1002
11:30:47,540 INFO  [org.alfresco.web.site.FrameworkHelper] Successfully Initialized Web Framework
11:31:02,009 INFO  [org.alfresco.web.scripts.DeclarativeRegistry] Registered 67 Web Scripts (+0 failed), 71 URLs
11:31:02,009 INFO  [org.alfresco.web.scripts.AbstractRuntimeContainer] Initialised Presentation Web Script Container (in 463.63574ms)
11:31:03,087 INFO  [org.alfresco.util.OpenOfficeConnectionTester] The OpenOffice connection was re-established.
11:32:04,400 INFO  [org.alfresco.web.scripts.DeclarativeRegistry] Registered 101 Web Scripts (+0 failed), 105 URLs
11:32:04,400 INFO  [org.alfresco.web.scripts.AbstractRuntimeContainer] Initialised WebFramework Web Script Container (in 62345.36ms)
11:32:04,462 INFO  [org.alfresco.web.site.FrameworkHelper] Successfully Initialized Web Framework
11:50:53,134 ERROR [org.alfresco.webdav.protocol] Internal Server Error:
java.lang.RuntimeException: Error during run as.
Caused by: java.lang.OutOfMemoryError: Java heap space

After I had this problem I went to the 3.0stable installation guide and on page 43, I saw this:

JVM settings
Alfresco generates a high proportion of temporary objects, both in client threads as well as in the
background processes. In order to reduce the number of temporary objects into the OldGen portion of the
heap, you need to set the NewSize option.
The following settings reduced the garbage collections and revealed (with GC printing and JMX tracing)
that the OldGen was not growing noticeably over and above the permanent space allocated for caches.
Cache sizes are still estimated top out around 520M. The StackSize should also be generously set to 1M.
So, for a typical 32 bit installation:
JAVA_OPTS=
-server
-Xcomp
-Xbatch
-Xss1024K
-Xms1G
-Xmx2G
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:NewSize=512m
-XX:MaxPermSize=128M
-XX:CMSInitiatingOccupancyFraction=80
Given that the OldGen is composed primarily of cache data of up to about 520M, at least 1GB should be
reserved for OldGen. Once -Xmx increases, the OldGen can be increased to 2G. 512M should be left as
a buffer to account for miscellaneous (PermGen, and so on). So the following variations might be applied:
-Xmx2G -Xms1G -XX:NewSIze=512M (OldGen at least 1G)
-Xmx3G -Xms1G -XX:NewSize=512M (OldGen at least 2G)
-Xmx4G -Xms2G -XX:NewSize=1G (OldGen at least 2.5G)
-Xmx6G -Xms3G -XX:NewSize=2G (OldGen at least 3.5G)
-Xmx8G -Xms4G -XX:NewSize=3G (OldGen at least 4.5G)

Following those instructions, I changed the set JAVA_OPTS line in my alfresco.bat to:

set JAVA_OPTS=-server -Xcomp -Xbatch -Xss1024K -Xms1G -Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:NewSize=512m -XX:MaxPermSize=128M -XX:CMSInitiatingOccupancyFraction=80

Now alfresco will not even boot up.  All i get in the command prompt is
c:\Alfresco>alf_start
Starting Tomcat…
Using CATALINA_BASE:  C:\Alfresco\tomcat
USING CATALINA_HOME: C:\Alfresco\tomcat (etc…)

And then I get a flash of another command prompt which disappears and that's it.  Please help.
3 REPLIES 3

rudischmitz
Champ in-the-making
Champ in-the-making
Try a simple setting first like

-server -Xms640m -Xmx2G -XX:MaxPermSize=128M

I have found that having an installed tomcat Manager setup is good for seeing where your JVM ram is going. Because you can see how the ram is being used as a transaction is going on in tomcat.

under tomcat manager click on the server status on the right.  see picture

http://linux-sxs.org/internet_serving/manager.jpg

then you will get this window in the middle it will show jvm settings.

[img]http://linux-sxs.org/internet_serving/status.jpg[/img]

So while uploading a huge file setup hit refresh on this page and it will show you the ram being used by alfresco.

I don't think the windows install sets up the manager pages but maybe i wasn't typing in the correct url.

pescha
Champ in-the-making
Champ in-the-making
I followed your advice and was able to log in to tomcat manager.

I'm not sure how useful it is because under server status it says that I have a lot more free memory than I probably do.

For example, I set a heap size of 1Gb.  Under task manager, I see CPU usage of 100% and 1.23gb of mem usage.  Tomcat manager, on the other hand, says that Total memory is 972.81mb, and free memory at 796.54mb.

How can that be?  In any case, alfresco just slowly grinds to a halt.  This happens if I set up a localhost transfer over Webdav or when I delete an unsuccessful transfer from within alfresco's web interface.

rudischmitz
Champ in-the-making
Champ in-the-making
How large are the webdav files? how much physical ram is on this XP box/VM?

I have successfully tested WEBDAVing single files that are over 4GB in size to alfresco 2.9c on with postgresql on 64-bit linux.
I could not use the alfresco web client to do over 2GB in size.

I think this makes sense because Tomcat's Java has grabbed around 1 GB of Memory.
So when alfresco starts java (JVM)grabs 1GB of windows Memory and starts doing what it wants with it.
It is JVMs to control and dole out to the tomcat apps running. 972-796=176Mb is being used by alfresco app.  The rest is "free" 796Mb ready to be doled out by JVM.
Windows Task Manager sees it as used by java.