Yes I am using threads (threading module).
I initialise the JVM like this: jvm = lucene.initVM(initialheap='8G',
maxheap='8G')
Then I use it as follows:
for i in range(8):
t = ThreadSearch(queue, jvm)
t.setDaemon(True)
t.start()
with ThreadSearch built like this:
class ThreadSearch(threading.Thread):
def __init__(self, queue, jvm):
threading.Thread.__init__(self)
self.queue = queue
self.jvm = jvm
def run(self):
self.jvm.attachCurrentThread()
I have tried lucene.getVMEnv().attachCurrentThread() instead but I still get
the same error message.
Thanks,
David
From: Greg Bowyer [mailto:[email protected]]
Sent: 29 March 2012 17:30
To: David Mosca
Cc: [email protected]
Subject: Re: PyLucene Error Message
Wow a VM / hotspot crash, are you using threads ?
If you are make sure you have correctly attached the vm env to each new thread
*after* you have initialised it on the main thread
This is done with the following
lucene.getVMEnv().attachCurrentThread()
On 29/03/2012 09:10, David Mosca wrote:
I have re-attached the log.
Thanks,
David
-----Original Message-----
From: Greg Bowyer [mailto:[email protected]]
Sent: 29 March 2012 16:55
To: [email protected]<mailto:[email protected]>
Subject: Re: PyLucene Error Message
I dont see any attached log, can you attach the log please.
-- Greg
On 29/03/2012 07:35, David Mosca wrote:
Hello,
I am using Lucene version 3.4 through the Python extension (pylucene)
in a multi-threaded script. When I launch the script I sometimes get a
fatal error message (log attached) and sometimes not (I always launch
the same script, exactly in the same way). When I get the error
message I keep launching the script again until the script stops
crashing (it sometimes takes up to 5 or 6 times).
Could you please have a look into this?
Thank you.
*David*
---------------------------------------------------------------------
To unsubscribe, e-mail:
[email protected]<mailto:[email protected]>
For additional commands, e-mail:
[email protected]<mailto:[email protected]>