Mailing List Archive

ModPython & deadlock
Hi,

I'm using Trac 0.7.1 w/ ModPython (3.1.3) and Apache 2.0.49

After a couple of days of activities, Apache always stops processing
Trac requests:

1/ The first request that is not satisfied ends up with an "Internal
Server Error"
2/ Subsequent requests seem to do nothing (the browser waits for data
that never come out from Apache)

... until Apache is restarted.

I do not find any useful information in the Apache log file to help
debugging.
"server-status" helper of Apache reports that all threads dealing with
trac URLs are in state "W" ('sending reply')

I don't know about mod_python. Is the "PythonLogHandler" directive can
be used to produce any important information to a dedicated log file ?

Thanks,
Manu
ModPython & deadlock [ In reply to ]
On Wed, Jul 07, 2004 at 12:33:39AM +0200, Emmanuel Blot wrote:
> Hi,
>
> I'm using Trac 0.7.1 w/ ModPython (3.1.3) and Apache 2.0.49
>
> After a couple of days of activities, Apache always stops processing
> Trac requests:
>
> 1/ The first request that is not satisfied ends up with an "Internal
> Server Error"
> 2/ Subsequent requests seem to do nothing (the browser waits for data
> that never come out from Apache)

FWIW, I get the same thing; I thought it was the 'apachectl restart'
that happens on log rotation, since this breaks mod_python in general,
but even replacing it with 'apachectl stop; sleep 30; apachectl
startssl' does not fix the problem.

--
=Nicholas Riley <njriley@uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>
ModPython & deadlock [ In reply to ]
Emmanuel Blot wrote:

> Hi,
>
> I'm using Trac 0.7.1 w/ ModPython (3.1.3) and Apache 2.0.49
>
> After a couple of days of activities, Apache always stops processing
> Trac requests:
>
> 1/ The first request that is not satisfied ends up with an "Internal
> Server Error"
> 2/ Subsequent requests seem to do nothing (the browser waits for data
> that never come out from Apache)
>
> ... until Apache is restarted.
>
> I do not find any useful information in the Apache log file to help
> debugging.
> "server-status" helper of Apache reports that all threads dealing with
> trac URLs are in state "W" ('sending reply')
>
> I don't know about mod_python. Is the "PythonLogHandler" directive can
> be used to produce any important information to a dedicated log file ?
>
Hi,

This is a known problem already fixed in trunk and as of now in the
0.7-stable branch as well. We managed to create a potential deadlock
with our only lock :)

If you don't want to switch to use the 0.7-stable branch it might
be enough to just replace trac/ModPythonHandler.py with:

http://projects.edgewall.com/trac/file/branches/0.7-stable/trac/ModPythonHandler.py

/ Jonas
--
Jonas Borgstr?m | Edgewall Software
jonas@edgewall.com | Professional GNU/Linux & Open Source Consulting.
| http://www.edgewall.com/
ModPython & deadlock [ In reply to ]
> This is a known problem already fixed in trunk and as of now in the
> 0.7-stable branch as well. We managed to create a potential deadlock
> with our only lock :)

8')

> If you don't want to switch to use the 0.7-stable branch it might
> be enough to just replace trac/ModPythonHandler.py with:
>
> http://projects.edgewall.com/trac/file/branches/0.7-stable/trac/ModPythonHandler.py
>


Unfortunetly, it does not seem compatible with 0.7.1 official release.

Trac detected an internal error:

Environment instance has no attribute '_wiki_pages'

Is there a 0.7.2 or 0.8 release scheduled for the next days ?
If not, I may have to use the stable branch instead of the official
releases.

Thanks for your help,
Manu
ModPython & deadlock [ In reply to ]
Emmanuel Blot wrote:

>
>> This is a known problem already fixed in trunk and as of now in the
>> 0.7-stable branch as well. We managed to create a potential deadlock
>> with our only lock :)
>
>
> 8')
>
>> If you don't want to switch to use the 0.7-stable branch it might
>> be enough to just replace trac/ModPythonHandler.py with:
>>
>> http://projects.edgewall.com/trac/file/branches/0.7-stable/trac/ModPythonHandler.py
>>
>
>
>
> Unfortunetly, it does not seem compatible with 0.7.1 official release.
>
> Trac detected an internal error:
>
> Environment instance has no attribute '_wiki_pages'
>
> Is there a 0.7.2 or 0.8 release scheduled for the next days ?
> If not, I may have to use the stable branch instead of the official
> releases.

I'm not sure when the next release will be, but you can checkout the
stable branch like this:

svn co http://svn.edgewall.com/repos/trac/branches/0.7-stable

/ Jonas
--
Jonas Borgstr?m | Edgewall Software
jonas@edgewall.com | Professional GNU/Linux & Open Source Consulting.
| http://www.edgewall.com/
ModPython & deadlock [ In reply to ]
> I'm not sure when the next release will be, but you can checkout the
> stable branch like this:
>
> svn co http://svn.edgewall.com/repos/trac/branches/0.7-stable

Done.

Unfortunetly, it does not seem to solve the problem:
I still experience a "500 Internal server error" issue.
Non-trac based page of the Apache server are still served properly.

server-status report:

*1-1* 27751 0/33/33 *W* 0.61 4932 0 0.0 2.60 2.60
164.129.1.39 <host> GET /trac/admin HTTP/1.1


I don't think it comes from the rotating logged files either:
As suggested Nicholas on July 7th, after the log files have been
rotated, I stop the Apache server, waits for a while, and start back the
Apache server.

Thanks,
Manu
ModPython & deadlock [ In reply to ]
On Tue, 13 Jul 2004 11:58am, Emmanuel Blot wrote:
> As suggested Nicholas on July 7th, after the log files have been
> rotated, I stop the Apache server, waits for a while, and start back
> the Apache server.

I'm still getting this too, fwiw. My server is pretty lightly loaded and
I have to restart it once or twice a week. Guess I should just set up a
cron job...
--
Nicholas Riley <njriley@uiuc.edu>