[Twisted-web] xmlrpc resource file descriptor leak

Phil Mayers p.mayers at imperial.ac.uk
Mon Jun 30 07:25:44 EDT 2008

This is a bit vague, and I wanted to get some feedback before I submit a 

We have a long-running twisted / nevow process that basically has:

   \- RPC2 - a twisted.web.xmlrpc.XMLRPC sub-class
   \- ui   - nevow pages

The thing hung up over the weekend with "too many open file descriptors" 
and before I killed it I did an "lsof"; lots of the files were:

python25 20163  nsg   31u   REG              253,0      370   3276854 
/tmp/tmp5QJivu (deleted)

...and "cat /proc/20163/fd/31" shows:

<?xml version='1.0'?>

...which is an XMLRPC call from a Zope server on another machine to this 
process. I presume the t.w.http.Request content is getting written to a 
tempfile, but I can't understand why - the Content-Length is tiny (<400 

I can't seem to reproduce this in a sample application though; does 
anyone have any ideas how I can narrow down the problem?

More information about the Twisted-web mailing list