Unable to save workflow due to Java heap space.

Hi,

I have 400mb in memory. When I go to save it fails on the pivot node (Pivot is the node name in the save dialogue).

Is there a way around this? What is the main memory requirement for saving?

Many thanks,

Jay

I am running Kinme. 1.3.5 on Windows XP 32-bit....4gb RAM

-Xmx256M
-Xmx1536M

Here is the console messaging if it is at all helpful...

DEBUG	 WorkflowEditor	 Saving workflow ...
ERROR	 SaveWorflowRunnable	 Could not save workflow
ERROR	 SaveWorflowRunnable	 Java heap space
DEBUG	 SaveWorflowRunnable	 Could not save workflow
java.lang.OutOfMemoryError: Java heap space
ERROR	 WorkflowEditor	 Could not save workflow: Could not save workflow: Java heap space
DEBUG	 WorkflowEditor	 Could not save workflow: Could not save workflow: Java heap space
java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:350)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:479)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:265)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1107)
	at org.knime.workbench.editor2.WorkflowEditor.doSave(WorkflowEditor.java:1018)
	at org.eclipse.ui.internal.SaveableHelper$1.run(SaveableHelper.java:130)
	at org.eclipse.ui.internal.SaveableHelper$4.run(SaveableHelper.java:257)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:763)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:760)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2283)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:263)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:243)
	at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:135)
	at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1414)
	at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:2995)
	at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3008)
	at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:67)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.knime.product.rcp.KNIMEApplication.run(KNIMEApplication.java:76)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: org.eclipse.swt.SWTException: Invalid thread access
	at org.eclipse.swt.SWT.error(SWT.java:3374)
	at org.eclipse.swt.SWT.error(SWT.java:3297)
	at org.eclipse.swt.SWT.error(SWT.java:3268)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:435)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:331)
	at org.eclipse.swt.widgets.ToolItem.setEnabled(ToolItem.java:591)
	at org.eclipse.jface.action.StatusLine.setCanceled(StatusLine.java:441)
	at org.eclipse.jface.action.StatusLineManager$1.setCanceled(StatusLineManager.java:191)
	at org.eclipse.core.runtime.ProgressMonitorWrapper.setCanceled(ProgressMonitorWrapper.java:132)
	at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.setCanceled(EventLoopProgressMonitor.java:151)
	at org.knime.workbench.editor2.SaveWorflowRunnable.run(SaveWorflowRunnable.java:136)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)

Hi Jay! Just a guess, the internal hilite mapping can get really big for some datsets and therefor the memory usage will go up dramatically, when you start saving this mapping. By chance, did you select "Enable hihlite", if so, please disable this option in the dialog and try again. Regards, Thomas

I have the same problem after running a process that uses up all the memory. It doesn’t really matter what I set the parameters to. For instance, I’m using:

-Dknime.expert.mode=true
-Xmx2548M
-Xms2048M
-XX:MaxPermSize=512M

With these settings, if at any point during my Knime session the Knime memory usage reaches 2568M, then I’m screwed. This happens, for instance, if I use the Weka plugin to create a decision tree. I won’t be able to save my work or workspace afterwards, even if I (hopefully) free memory by resetting all the nodes. I have to quit out and recreate my workspace by hand.

Perhaps there is a magically configuration that prevents this phenomena from occurring?

1 Like