#3481: Tracd HTTP response is very slow in windows between PCs.
-------------------------------+--------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  all       
     Type:  defect             |       Status:  closed    
 Priority:  high               |    Milestone:            
Component:  tracd              |      Version:  0.9.6     
 Severity:  normal             |   Resolution:  worksforme
 Keywords:  slow network       |  
-------------------------------+--------------------------------------------
Changes (by cboos):

  * status:  new => closed
  * resolution:  => worksforme
  * milestone:  0.9.7 =>

Comment:

 The standard python HTTPServer used by TracStandalone will log each client
 request. While doing this, it tries to resolve the client's numerical IP
 address to a fully qualified name.
 You probably don't have a DNS server correctly setup in your environment,
 hence the slow down.

 So either fix that (preferred solution) or, if it's not an option, apply
 the following patch (hack):

 {{{
 Index: trac/web/standalone.py
 ===================================================================
 --- trac/web/standalone.py      (revision 3387)
 +++ trac/web/standalone.py      (working copy)
 @@ -249,6 +249,16 @@
          self.wfile = None
          self.rfile = None

 +    def address_string(self):
 +        """Return the client address formatted for logging.
 +
 +        This version doesn't look up the full hostname using
 +        gethostbyaddr() ...
 +        """
 +
 +        host, port = self.client_address[:2]
 +        return host
 +
      def do_POST(self):
          self._do_trac_req()

 }}}

 (patch on stable, something similar could be done on trunk; the method is
 added to the TracHTTPRequestHandler class)

-- 
Ticket URL: <http://trac.edgewall.org/ticket/3481#comment:1>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets

Reply via email to