Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#1999 closed defect (fixed)

Traceback in Apache error log

Reported by: sam@… Owned by: Christopher Lenz
Priority: low Milestone: 0.9
Component: general Version: devel
Severity: minor Keywords: traceback error log
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Sometimes, I get a Python traceback in the Apache's error log because of an unexpected connection close on the client side. I don't think such a big traceback belongs to Apache error log, and this error can be silently ignored.

[Thu Sep 01 02:40:24 2005] [error] [client 84.132.233.102] PythonHandler trac.web.modpython_frontend: Traceback (most recent call last):
[Thu Sep 01 02:40:24 2005] [error] [client 84.132.233.102] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n    result = object(req)
[Thu Sep 01 02:40:24 2005] [error] [client 84.132.233.102] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line 207, in handler\n    send_pretty_error(e, env, mpr)
[Thu Sep 01 02:40:24 2005] [error] [client 84.132.233.102] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 253, in send_pretty_error\n    req.write('Oops...\\n\\nTrac detected an internal error:\\n\\n')
[Thu Sep 01 02:40:24 2005] [error] [client 84.132.233.102] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line 89, in write\n    self.req.write(data)
[Thu Sep 01 02:40:24 2005] [error] [client 84.132.233.102] PythonHandler trac.web.modpython_frontend: IOError: Write failed, client closed connection.

For information :

[Thu Sep 01 02:38:55 2005] [notice] Apache/2.0.54 (Debian GNU/Linux) DAV/2 SVN/1.2.0 mod_python/3.1.3 Python/2.3.5 PHP/4.4.0-1 mod_ssl/2.0.54 OpenSSL/0.9.7g mod_perl/2.0.1 Perl/v5.8.7 configured -- resuming normal operations

It's been doing this for quite a while now (months).

Attachments (0)

Change History (3)

comment:1 by Christopher Lenz, 19 years ago

Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

comment:2 by Christopher Lenz, 19 years ago

I think the following change would get rid of these errors:

  • trac/web/main.py

     
    246246        if env and env.log:
    247247            env.log.error('Failed to render pretty error page: %s', e2,
    248248                          exc_info=True)
    249         req.send_response(500)
    250         req.send_header('Content-Type', 'text/plain')
    251         req.end_headers()
    252         req.write('Oops...\n\nTrac detected an internal error:\n\n')
    253         req.write(str(e))
    254         req.write('\n')
    255         req.write(tb.getvalue())
     249        try:
     250            req.send_response(500)
     251            req.send_header('Content-Type', 'text/plain')
     252            req.end_headers()
     253            req.write('Oops...\n\nTrac detected an internal error:\n\n')
     254            req.write(str(e))
     255            req.write('\n')
     256            req.write(tb.getvalue())
     257        except IOError:
     258            # Cannot send response, but the error has hopefully been logged
     259            pass
    256260
    257261def send_project_index(req, options, env_paths=None):
    258262    from trac.web.clearsilver import HDFWrapper

comment:3 by Christopher Lenz, 19 years ago

Resolution: fixed
Status: assignedclosed

Should be fixed in [2267].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.