|
List Info
Thread: PyLucene in CherryPy
|
|
| PyLucene in CherryPy |

|
2006-06-27 23:46:26 |
I am trying to use PyLucene in CherryPy or more specifically
TurboGears. Unfortunately, I am getting a segmentation
fault.
A quick search of the archive shows that other have had this
problem,
but I have not seen a successful solution. Has anyone had
any luck
getting PyLucene to run in CherryPy?
Is the only known working solution for using PyLucene in a
web
application mod_python?
Joe
_______________________________________________
pylucene-dev mailing list
pylucene-dev osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylu
cene-dev
|
|
| PyLucene in CherryPy |

|
2006-06-27 23:49:58 |
Yes. At the moment PyLucene won't work within a CherryPy
(and
therefore TG) app due to the issues with threading. There
is
currently no work around (that I know of at least) other
than running
PyLucene seperately.
Regards,
Lee
--
Lee McFadden
blog: http://www.splee.co.uk
work: http://fireflisystems.com
a>
_______________________________________________
pylucene-dev mailing list
pylucene-dev osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylu
cene-dev
|
|
| PyLucene in CherryPy |

|
2006-06-28 09:25:06 |
On Wed, 28 Jun 2006, Lee McFadden wrote:
> Yes. At the moment PyLucene won't work within a
CherryPy (and
> therefore TG) app due to the issues with threading.
There is
> currently no work around (that I know of at least)
other than running
> PyLucene seperately.
Is CherryPy using Twisted ? If so, there sure is a way.
We've been able to do
this in Chandler by customizing the thread pool.
http://s
vn.osafoundation.org/chandler/trunk/chandler/parcels/osaf/fr
amework/twisted/TwistedThreadPool.py
The RepositoryThread class used in this file is a subclass
of
PyLucene.PythonThread.
Andi..
_______________________________________________
pylucene-dev mailing list
pylucene-dev osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylu
cene-dev
|
|
| PyLucene in CherryPy |

|
2006-06-28 09:21:21 |
On Tue, 27 Jun 2006, joe kim wrote:
> I am trying to use PyLucene in CherryPy or more
specifically
> TurboGears. Unfortunately, I am getting a segmentation
fault.
>
> A quick search of the archive shows that other have had
this problem,
> but I have not seen a successful solution. Has anyone
had any luck
> getting PyLucene to run in CherryPy?
>
> Is the only known working solution for using PyLucene
in a web
> application mod_python?
To use PyLucene in a web app you must ensure that the thread
calling into
PyLucene is an instance of PyLucene.PythonThread. This makes
sure the thread
is created via libgcj and that the libgcj garbage collector
is made aware of
it. Currently, there is no way to register a thread with the
libgcj garbage
collector after it has been created. This is a long standing
limitation of the
garbage collector...
I don't know CherryPy or mod_python but there's got to be
a way to customize
the thread pools used to create the 'right' kind of thread
instance.
If someone comes up with a solution it'd be great to post
it here as this is a
rather frequently asked question.
Andi..
_______________________________________________
pylucene-dev mailing list
pylucene-dev osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylu
cene-dev
|
|
| PyLucene in CherryPy |

|
2006-06-28 12:04:15 |
Hi,
On 28-6-2006, at 11.21 am, Andi Vajda wrote:
> I don't know CherryPy or mod_python but there's got
to be a way to
> customize the thread pools used to create the 'right'
kind of
> thread instance.
>
> If someone comes up with a solution it'd be great to
post it here
> as this is a rather frequently asked question.
>
I am using CherryPy 2.2.1 and PyLucene 2.0.0 on Windows
2000. For
them to work together, I have imported PyLucene and replaced
PyLucene.PythonThread for threading.Thread in _cpserver.py
and
_cpwsgiserver.py. I have also disabled CherryPy's
autoreload (by
adding autoreload.on=False to my configuration file) because
autoreload uses low level threads. The result seems to work
fine for
now.
Álvaro
> Andi..
> _______________________________________________
> pylucene-dev mailing list
> pylucene-dev osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/pylu
cene-dev
_______________________________________________
pylucene-dev mailing list
pylucene-dev osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylu
cene-dev
|
|
| PyLucene in CherryPy |

|
2006-06-28 12:23:47 |
|
On 28. jun. 2006, at 14.04, Álvaro Falquina Garrido wrote: Hi,
On 28-6-2006, at 11.21 am, Andi Vajda wrote:
I don't know CherryPy or mod_python but there's got to be a way to customize the thread pools used to create the 'right' kind of thread instance.
If someone comes up with a solution it'd be great to post it here as this is a rather frequently asked question.
I am using CherryPy 2.2.1 and PyLucene 2.0.0 on Windows 2000. For them to work together, I have imported PyLucene and replaced PyLucene.PythonThread for threading.Thread in _cpserver.py and _cpwsgiserver.py. I have also disabled CherryPy's autoreload (by adding autoreload.on=False to my configuration file) because autoreload uses low level threads. The result seems to work fine for now.
Álvaro
Using the same appro ach as Álvaro, my experiments with cherrypy 2.x and pylucene 1.x showed that it ran without problems on OS X 10.3/4 but failed miserably on linux 2.4/2.6 (redhat ES-2/3/4).
regards /rune Happy those, who can remain at Highbury! Jane Austen (1775-1817) |
| PyLucene in CherryPy |

|
2006-06-28 13:35:38 |
On Wed, 28 Jun 2006, Rune Hansen wrote:
> Using the same approach as Álvaro, my experiments with
cherrypy 2.x and
> pylucene 1.x showed that it ran without problems on OS
X 10.3/4 but failed
> miserably on linux 2.4/2.6 (redhat ES-2/3/4).
This may be a gcj version issue. What Linux are you running
on and what gcj
did you use to build PyLucene on it ?
Andi.._______________________________________________
pylucene-dev mailing list
pylucene-dev osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylu
cene-dev
|
|
[1-7]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|