[Xapian-discuss] Xapian 1.0 / Apache / Python problem

Richard Boulton richard at lemurconsulting.com
Fri May 25 14:19:19 BST 2007


Jason Stitt wrote:
> By default mod_python prints stack traces. There's no exception being 
> fired, at least not in Python-space.

So, it's just hanging for an indefinite time.   Sounds like a threading 
problem, perhaps.

> Good idea. Creating a QueryParser does the same thing.
> 
> Incidentally, I can access the QueryParser *class* without a problem, 
> it's just instantiating it that hangs things up.

That's very interesting: the QueryParser class is a pure Python class, 
which references a compiled non-pure python class when it's instantiated 
or any method is called.  So it sounds like you're having a problem 
whenever a method attempts to call through to the C++ layer.

> What's still bugging me is that this only happens when running under 
> apache. Is there a way to run a debugger in that circumstance?

I'm afraid I don't know about the debugger part, but I'm suspecting that 
this is something to with a change we made to make the Xapian Python 
bindings drop the GIL when calling the C library, to enable concurrent 
searches and other operations.

I'm guessing that the threading environment provided when you're called 
from apache is incompatible in some way with the threading stuff we're 
doing.  We're using Python's threading functions though, so I'm quite 
surprised by this.

(What version of apache, and what threading model are you using, 
incidentally?)

-- 
Richard



More information about the Xapian-discuss mailing list