Edgewall Software
Modify

Ticket #1999 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Traceback in Apache error log

Reported by: sam@… Owned by: cmlenz
Priority: low Milestone: 0.9
Component: general Version: devel
Severity: minor Keywords: traceback error log
Cc:
Release Notes:
API 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

Change History

comment:1 Changed 7 years ago by cmlenz

  • Owner changed from jonas to cmlenz
  • Status changed from new to assigned

comment:2 Changed 7 years ago by cmlenz

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 Changed 7 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from assigned to closed

Should be fixed in [2267].

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cmlenz. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.