开发者

Trac, mod_wsgi, premature end of script headers

When running Trac on a server where mod_wsgi is configured in daemon road, Trac throws many errors of the form :"Premature end of script headers". I've looked into this, and it seems that there is a mismatch of versions of the expat library between Trac and Apache. Sadly, I am not in a position to rebuild Apache, which seems to be the only solution offered for this problem.

I'm wondering if any other solutions are possible. When I run in embedded mode, this problem disappears. Is it possible to configure a virtual host for Trac requests that runs in embedded mode, while other requests are handled by a host configured for daemon mode? We use daemon mod开发者_如何学编程e because of a Django project, so we don't have to restart the server when code is changed. But I don't know if setting thing up this way will solve the problem, or if such a setup is even possible.


Running in embedded mode isn't going to solve the problem. The message may go away but your Apache child process are likely still crashing, but that they are doing so may not be as obvious as main Apache error log would just be showing 'Segmentation fault' and little else.

When you say you looked into this, did you actually verify it as being the expat problem by running the tests documented on the mod_wsgi site?

I ask as expat issue is not the only reason why Trac may crash. Use of the Python wrappers for subversion in a sub interpreter can also cause problems. So, have you tried the documented workaround of setting:

WSGIApplicationGroup %{GLOBAL}

Have you gone as far as analysing with gdb where the code is crashing again as is documented on mod_wsgi wiki.

As for your question of whether Trac can run in embedded and your Django in daemon mode, yes it can be done, but from what I can see it likely isn't solving the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜