I got the Jpype run smoothly except it takes up ram slowly when it runs for a long time. I need to make repeated calls of the java methods for at least 100 thousand times and it consumes all the ram space and reports the following message: Fatal Python error: PyEval_SaveThread: NULL tstate.
My question is that is it a problem of memory leak? If so how should I solve it? I tried to use System.gc() to release the garbage, but it doesn't help much. I read through previous threads and noticed there was a discussion on memory leak, but not sure it has been fixed on the Jpype. I am using JPype-0.5.4.2.win-amd64-py2.7.exe
For instance, if I run 10 thousand iteration of the following method, the ram could be steadily, though slowly, increasing in usage.
Hi, would you happen to still have a copy of JPype-0.5.4.2.win-amd64-py2.7.exe? I've been looking to find that file but it seems nowhere to be found on the internet! If you wouldn't mind sharing it I would be very grateful.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You should contact the new maintainers of jpype on github at originell/jpype
Steve Menard
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.
Rick Cook, The Wizardry Compiled
There are two major products that come out of Berkeley: LSD and UNIX. We
don't believe this to be a coincidence.
-- Jeremy S. Anderson
Hi, would you happen to still have a copy of
JPype-0.5.4.2.win-amd64-py2.7.exe? I've been looking to find that file but
it seems nowhere to be found on the internet! If you wouldn't mind sharing
it I would be very grateful.
There could very well be a small memory leak. From the error you mention the leak is most likely in the python side rather than the java, so calling System.gc would not help.
Unfortunately short of diving deep into the code there isnt much you can do to fix it. I have run tests will many thousands of calls, sorhe leak doea not happen every time.
I can't check right now, but if there is a way to give more memory to the python VM, that could let you run you program to completion.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I got the Jpype run smoothly except it takes up ram slowly when it runs for a long time. I need to make repeated calls of the java methods for at least 100 thousand times and it consumes all the ram space and reports the following message: Fatal Python error: PyEval_SaveThread: NULL tstate.
My question is that is it a problem of memory leak? If so how should I solve it? I tried to use System.gc() to release the garbage, but it doesn't help much. I read through previous threads and noticed there was a discussion on memory leak, but not sure it has been fixed on the Jpype. I am using JPype-0.5.4.2.win-amd64-py2.7.exe
For instance, if I run 10 thousand iteration of the following method, the ram could be steadily, though slowly, increasing in usage.
def analyze(var):
Library = JPackage("edu").Toolkit.getInstance().getLibrary()
options = JPackage("edu").cornell.rdsat.api.beans.PartitionAnalysisOptions()
Thank you for any help!
Yongren
Hi, would you happen to still have a copy of JPype-0.5.4.2.win-amd64-py2.7.exe? I've been looking to find that file but it seems nowhere to be found on the internet! If you wouldn't mind sharing it I would be very grateful.
You should contact the new maintainers of jpype on github at originell/jpype
Steve Menard
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.
Rick Cook, The Wizardry Compiled
There are two major products that come out of Berkeley: LSD and UNIX. We
don't believe this to be a coincidence.
-- Jeremy S. Anderson
On Fri, Jun 12, 2015 at 8:43 PM, Mehrdad N. wfunction@users.sf.net wrote:
There could very well be a small memory leak. From the error you mention the leak is most likely in the python side rather than the java, so calling System.gc would not help.
Unfortunately short of diving deep into the code there isnt much you can do to fix it. I have run tests will many thousands of calls, sorhe leak doea not happen every time.
I can't check right now, but if there is a way to give more memory to the python VM, that could let you run you program to completion.