[Twisted-Python] Traceback on loseConnection

Werner Thie wthie at thiengineering.ch
Thu Feb 5 05:34:05 EST 2009

Hi Jean-Paul

Sorry for coming back...

Just to be a little more precise:

This is a nevow/athena site I therefore have little done in the bowels 
of twisted and specially no artwork in handling loseConnection.

Site running on twisted SVN 25479 (appr 8.1.0) shows absolutely no problems.

Site running on twisted SVN 26124 (appr 8.2.0) shows this problem, which 
definitely means that something in the guts of twisted is now barfing at me.

But its only about 700 SVN commits in between, I think I will do a SA 
approach to figure out where this barfing starts and try to nail it to 
the relevant commit.

I would be more than thankful if somebody could spare me this effort by 
throwing in an educated guess.

Thxs, Werner

PS I like the one about the dots, that's why I'm not working with Java

Jean-Paul Calderone wrote:
> On Wed, 04 Feb 2009 11:04:26 +0100, Werner Thie 
> <wthie at thiengineering.ch> wrote:
>> Hi all
>> My users are complaining that they get the odd disconnect while using 
>> my site built with nevow/athena on FreeBSD 7.1 with the poll reactor. 
>> I recently switched to twisted 8.2 release and am now observing 199 
>> 'Unhandled Error' out of 298436 logged requests with the following 
>> traceback.
>> Any clues?
>> TIA, Werner
>> [snip]
>>           File 
>> "/usr/local/lib/python2.5/site-packages/Twisted-8.2.0_r26128- 
>> py2.5-freebsd-7.1-RELEASE-amd64.egg/twisted/web/proxy.py", line 79, in 
>> handleResponseEnd
>>             self.father.channel.transport.loseConnection()
>>         exceptions.AttributeError: 'NoneType' object has no attribute 
>> 'transport'
> Anywhere there are that many dots in a single expression, there's bound to
> be trouble. :)
> It's probably something rather simple, like the connection being lost near
> when the response ends.  It's probably also pretty easy to fix (by being
> more careful in how lost connections are handled).  If you can create a
> short example which reproduces the problem, that'll go a long way towards
> helping it get fixed.  I suggest instrumenting the codepath that sets the
> "channel" attribute to None and watching to see what happens.
> Jean-Paul
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

More information about the Twisted-Python mailing list