我们的 Jython 环境存在问题,这意味着在 PythonInterpreter 对象上调用一定数量的 eval 之后,我们遇到了“Out of permgen memory”错误。
有没有人有这方面的经验以及如何解决它?
我们目前在 Jython 2.5.2 上运行。
下面是用于重复调用解释器的代码摘录。
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;
}