cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco : up to 10GB memory used...and even more !

zomurn
Champ in-the-making
Champ in-the-making
Here the prof in image :

[img]http://img522.imageshack.us/img522/6558/outstanding.th.jpg[/img]


Running a poor sheduled job requires up to 10GB and still grow up !! 10GB used in 10 minutes !
Which is the configuration required for this monster ?  Smiley Surprised
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
Are you sure there isn't a memory leak in your job?

Also some JVMs only give back memory when asked, otherwise they keep grabbing more.

You should probably use a profiler or take a thread dump to see where the memory has gone.

zomurn
Champ in-the-making
Champ in-the-making
My job just do a move instruction with filefolderservice :

Here the whole code :

@Override
   protected void executeImpl(Action pAction, NodeRef pActionedUponNodeRef) {

      if (log.isDebugEnabled())
      {
         log.debug( "Running scheduled job " + NAME );
      }

      NodeRef lDestNodeRef = mscSearchService
            .getFolder( MscFolderEnum.FOLDER_ARCHIVER.getFolderName() );

      if (this.nodeService.exists( pActionedUponNodeRef ) == true)
      {
         if (nodeService.getType( pActionedUponNodeRef ).equals(
               MscTypeEnum.COURRIER.getTypeQName() ))
         {

            String lName = (String) nodeService.getProperty(
                  pActionedUponNodeRef, ContentModel.PROP_NAME );

            if (log.isDebugEnabled())
            {
               log.debug( "Moving node " + lName + " to folder "
                     + MscFolderEnum.FOLDER_ARCHIVER.getFolderName() );
            }
            try
            {
               fileFolderService.move( pActionedUponNodeRef, lDestNodeRef,
                     null );
               nodeService.setProperty( pActionedUponNodeRef,
                     MscPropertyEnum.PROPERTY_ETAT.getQName(),
                     MscStateEnum.ARCHIVE.toString() );
               mscNodeService.updatePropertyTrace( pActionedUponNodeRef,
                     WHO );
            }
            catch (Exception e)
            {
               e.printStackTrace();
               throw new IllegalStateException( "Failed to move document "
                     + lName + " to folder "
                     + MscFolderEnum.FOLDER_ARCHIVER.getFolderName() );

            }
         }
      }

   }

OK for JVM memory but…I never coded a program that requires more than 10GB !
Which tool(s) do you suggest to profile where the memory goes ?
There is something wrong behind the scene…internal in alfresco or its dependencies.

mrogers
Star Contributor
Star Contributor
I've used "JProfiler" before.

Also which JVM are you using and what are your memory settings?   

As I tried (unsuccesfully) to say above, some JVMs don't bother garbage collecting until they need to, I
remember getting surprised by a solaris system that did this and it turned out to be working correctly.