We have a problem with our Jython environment, meaning that after a certain amount of calls to eval on the PythonInterpreter object, we run into an 'Out of permgen memory' error.
Does anybody have any experience with this and how to solve it?
We are currently running on Jython 2.5.2.
Below is an excerpt of the code used to repeatedly invoke the interpreter.
public Map<String, String> invoke(Map<String, String> parameters) {
//logger.info("Executing script for parameters: " + parameters);
this.interpreter.set("inputDict", parameters);
PyDictionary dict = (PyDictionary)this.interpreter.eval(ScriptComposer.mainMethodName + "(inputDict)");
//logger.info("Done executing script for parameters: " + parameters);
return dict;
}