java.lang.OutOfMemoryError: Java heap space Java heap space

Seven Stars

java.lang.OutOfMemoryError: Java heap space Java heap space

Hi,
Today is  my worst working day so far.
All the changes i have made to my job in TOS is lost, when i came across this error while saving my job, "java.lang.OutOfMemoryError: Java heap space"
All the changes i have made to my job is gone, and this error still persists. How can i overcome this thing. I have increased the heap memory in this location. And after to saves, this exception again rose to the surface.
" C:\Program Files (x86)\Talend-Studio\studio\configuration\config.ini "
Increased the heap to 1024mb, 

-vm
C:\Program Files (x86)\Talend-Studio\jre1.8.0_91\bin\server\jvm.dll
-vmargs
-Xms1024m
-Xmx2048m
-Dfile.encoding=UTF-8

Where shall i increase the heap size to never see this exception again, please specify the name of the file too.  

org.talend.commons.exception.PersistenceException: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object 'org.talend.designer.core.model.utils.emf.talendfile.impl.ProcessTypeImpl@2393344d (description: null, author: null, comment: null, defaultContext: DEMO, name: null, purpose: null, repositoryContextId: null, status: null, version: null, screenshot: null, jobType: Big_Data_Batch, framework: MapReduce)' is not contained in a resource.
at org.talend.commons.runtime.model.emf.EmfHelper.saveResource(EmfHelper.java:221)
at org.talend.commons.runtime.model.emf.EmfHelper.saveResource(EmfHelper.java:199)
at org.talend.core.repository.utils.XmiResourceManager.saveResource(XmiResourceManager.java:629)
at org.talend.repository.localprovider.model.LocalRepositoryFactory.lock(LocalRepositoryFactory.java:1947)
at org.talend.core.repository.model.ProxyRepositoryFactory.lock(ProxyRepositoryFactory.java:936)
at org.talend.core.repository.model.ProxyRepositoryFactory.isEditableAndLockIfPossible(ProxyRepositoryFactory.java:1647)
at org.talend.designer.core.ui.editor.process.Process.checkReadOnly(Process.java:2764)
at org.talend.core.ui.editor.JobEditorInput.checkReadOnly(JobEditorInput.java:255)
at org.talend.core.ui.editor.JobEditorInput.checkInit(JobEditorInput.java:83)
at org.talend.core.ui.editor.JobEditorInput.<init>(JobEditorInput.java:68)
at org.talend.designer.core.ui.editor.ProcessEditorInput.<init>(ProcessEditorInput.java:39)
at org.talend.designer.core.ui.editor.ProcessEditorInput.<init>(ProcessEditorInput.java:30)
at org.talend.designer.mapreduce.editor.MapRedProcessEditorInput.<init>(MapRedProcessEditorInput.java:36)
at org.talend.designer.mapreduce.actions.EditMapRedProcessAction.doRun(EditMapRedProcessAction.java:146)
at org.talend.repository.ui.actions.AContextualAction$2.run(AContextualAction.java:632)
at org.talend.repository.RepositoryWorkUnit.executeRun(RepositoryWorkUnit.java:99)
at org.talend.core.repository.model.AbstractRepositoryFactory.executeRepositoryWorkUnit(AbstractRepositoryFactory.java:258)
at org.talend.repository.localprovider.model.LocalRepositoryFactory.executeRepositoryWorkUnit(LocalRepositoryFactory.java:3257)
at org.talend.core.repository.model.ProxyRepositoryFactory.executeRepositoryWorkUnit(ProxyRepositoryFactory.java:2053)
at org.talend.repository.ui.actions.AContextualAction.run(AContextualAction.java:641)
at org.talend.repository.viewer.action.RepoDoubleClickAction.run(RepoDoubleClickAction.java:117)
at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:229)
at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:853)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:850)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1142)
at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1249)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:278)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:272)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:313)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.talend.rcp.intro.Application.start(Application.java:208)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object 'org.talend.designer.core.model.utils.emf.talendfile.impl.ProcessTypeImpl@2393344d (description: null, author: null, comment: null, defaultContext: DEMO, name: null, purpose: null, repositoryContextId: null, status: null, version: null, screenshot: null, jobType: Big_Data_Batch, framework: MapReduce)' is not contained in a resource.
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:301)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:265)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:389)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1430)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:999)
at org.talend.commons.runtime.model.emf.EmfHelper.saveResource(EmfHelper.java:215)
... 60 more
Caused by: org.eclipse.emf.ecore.xmi.DanglingHREFException: The object 'org.talend.designer.core.model.utils.emf.talendfile.impl.ProcessTypeImpl@2393344d (description: null, author: null, comment: null, defaultContext: DEMO, name: null, purpose: null, repositoryContextId: null, status: null, version: null, screenshot: null, jobType: Big_Data_Batch, framework: MapReduce)' is not contained in a resource.
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.handleDanglingHREF(XMLHelperImpl.java:754)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getURIFragment(XMLHelperImpl.java:725)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getIDREF(XMLHelperImpl.java:747)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveIDRefSingle(XMLSaveImpl.java:1992)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1333)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1224)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2716)
at org.eclipse.emf.ecore.xmi.impl.XMISaveImpl.writeTopObjects(XMISaveImpl.java:84)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveImpl.java:595)
at org.talend.core.repository.model.PropertiesProjectResourceImpl$1.traverse(PropertiesProjectResourceImpl.java:54)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:251)
... 64 more


Thanks in advance.
Highlighted
Seven Stars

Re: java.lang.OutOfMemoryError: Java heap space Java heap space

Modify in 'C:\Program Files (x86)\Talend-Studio\studio\Talend-Studio-win-x86_64.ini'
adjust Xms and Xmx for what your machine can handle:
-vm
C:\Program Files (x86)\Talend-Studio\jre1.8.0_91\bin\server\jvm.dll
-vmargs
-Xms5120M
-Xmx20480M
-XX:MaxPermSize=2048m
-XX:+UseParallelGC
-Dfile.encoding=UTF-8
Seven Stars

Re: java.lang.OutOfMemoryError: Java heap space Java heap space

Modify in 'C:\Program Files (x86)\Talend-Studio\studio\Talend-Studio-win-x86_64.ini'
adjust Xms and Xmx for what your machine can handle:
-vm
C:\Program Files (x86)\Talend-Studio\jre1.8.0_91\bin\server\jvm.dll
-vmargs
-Xms5120M
-Xmx20480M
-XX:MaxPermSize=2048m
-XX:+UseParallelGC
-Dfile.encoding=UTF-8

Thanks jpmauss