Edgewall Software

Ticket #921 (closed enhancement: wontfix)

Opened 4 years ago

Last modified 2 years ago

Using cgitb module to help in debugging.

Reported by: mcarpenter@… Owned by: cmlenz
Priority: normal Milestone:
Component: web frontend/mod_python Version: devel
Severity: normal Keywords:
Cc:

Description

While using the mod_python front end I'm getting database lock errors (soon to be the subject of another ticket). I was getting 500 errors from apache. It was helpful for me to add a cgitb handler.

Index: trac/ModPythonHandler.py
===================================================================
--- trac/ModPythonHandler.py    (revision 1049)
+++ trac/ModPythonHandler.py    (working copy)
@@ -178,7 +178,17 @@
         env_cache_lock.release()
     return env

+import cgitb
+
 def handler(req):
+    try:
+        handler2(req)
+    except:
+        req.content_type = 'text/html'
+        cgitb.Hook(file = req).handle()
+    return apache.OK
+
+def handler2(req):
     mpr = ModPythonRequest(req)
     mpr.init_request()

Now I can see the error in my browser, rather than tailing the error.log for apache. Perhaps this would be useful for other users debugging an install.

Attachments

Change History

Changed 4 years ago by mcarpenter@…

The locking problem turned out to be that I had sqlite 0.4.2 installed. I discovered this while trying to write a ticket for the problem I was having. Once I upgrade to sqlite 1.0 the problem appears to have gone away.

Changed 4 years ago by cmlenz

  • status changed from new to closed
  • resolution set to wontfix
  • severity changed from normal to enhancement

We already have the send_pretty_error feature. I don't see enough value of addings cgitb on top, especially as it would need to be added to every frontend.

Add/Change #921 (Using cgitb module to help in debugging.)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cmlenz. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.