[Xapian-tickets] [Xapian] #185: Deadlocks with apache mod_python and mod_wsgi

Xapian nobody at xapian.org
Sat Jul 19 01:43:14 BST 2008


#185: Deadlocks with apache mod_python and mod_wsgi
-----------------------------+----------------------------------------------
 Reporter:  richard          |        Owner:  richard 
     Type:  defect           |       Status:  assigned
 Priority:  normal           |    Milestone:          
Component:  Xapian-bindings  |      Version:  SVN HEAD
 Severity:  normal           |   Resolution:          
 Keywords:                   |    Blockedby:          
 Platform:  All              |     Blocking:          
-----------------------------+----------------------------------------------

Old description:

> Xapian appears to hang as soon as any Xapian methods are called from the
> Python
> bindings, when running using mod_python.  Reported at
> http://thread.gmane.org/gmane.comp.search.xapian.general/4486
>
> Similar problems reported on IRC with mod_wsgi - FAQ URL for this issue
> from WSGI:
>
> http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API

New description:

 = Summary of current known status =

 == mod_python ==

 Calling any Xapian methods or functions is likely to cause dead-lock
 unless you set the option {{{PythonInterpreter main_interpreter}}} in the
 Apache configuration section for all mod_python scripts which use Xapian.

 You may also need to use Python >= 2.4 (due to
 [http://issues.apache.org/jira/browse/MODPYTHON-217 problems with the APIs
 used in Python 2.3).

 Even with this fixed, calling from Xapian back to Python code won't work
 properly (this means that you can't subclass Xapian objects in Python).
 This is apparently an issue with mod_python.

 == mod_wsgi ==

 You'll need to set:

 {{{
 WSGIApplicationGroup %{GLOBAL}
 }}}

 For details see:
 http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIApplicationGroup
 and
 http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API

 The mod_wsgi developers say this should be sufficient, and you should be
 able to subclass Xapian objects in Python.  If you encounter problems,
 please talk to us or the mod_wsgi developers so we can investigate.

 ---

 Originally reported on the mailing list:
 http://thread.gmane.org/gmane.comp.search.xapian.general/4486

--

Comment(by olly):

 Just checked my IRC log and it was aa_ (on #xapian though).

 I've updated the bug description to attempt to summarise the current state
 of play.

-- 
Ticket URL: <http://trac.xapian.org/ticket/185#comment:26>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list