<br><font size=2 face="sans-serif">thanks for help.</font>
<br>
<br><font size=2 face="sans-serif">I did not see any difference with the
new _c_urlarg moduIe. I made then several trials and I found that Python
2.4.1 with Twisted 1.3.0 seems to be stable. It now runs for several days
without leak. Something a little bit strange is that I tried Python 2.4.1
with Twisted 2.0.1 and TwistedWeb 0.5.0, but with this configuration the
memory leak is very important. Yet with this config the objects number
(length of gc.get_objects()) is growing with no collection, as I use exactly
the same environment except Twisted version.</font>
<br>
<br><font size=2 face="sans-serif">Can you see a reason for that ?</font>
<br><font size=2 face="sans-serif"><br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Andrew Bennetts &lt;andrew-twisted@puzzling.org&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: twisted-web-bounces@twistedmatrix.com</font>
<p><font size=1 face="sans-serif">19/10/2005 16:05</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
&quot;Discussion of twisted.web, Nevow, &nbsp; &nbsp; &nbsp; &nbsp;and
Woven&quot; &lt;twisted-web@twistedmatrix.com&gt;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">&quot;Discussion of twisted.web, Nevow,
&nbsp; &nbsp; &nbsp; &nbsp;and Woven&quot; &lt;twisted-web@twistedmatrix.com&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [Twisted-web] Memory leak with twisted
web server on QNX</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<p><font size=1 color=#000080 face="sans-serif"><b>Security Level:?</b></font><font size=1 color=#800080 face="sans-serif">
&nbsp; &nbsp; &nbsp; &nbsp;</font><font size=1 face="sans-serif">Internal</font>
<br>
<hr><font size=2><tt>On Wed, Oct 19, 2005 at 10:15:24AM +0200, denis.leborgne@rieter.com
wrote:<br>
&gt; <br>
&gt; Hi,<br>
&gt; <br>
&gt; I use twisted as a very simple web server to serve python scripts.
I now have a<br>
&gt; problem of memory leak on the server. I use Python 2.2.1 on QNX 6.3,
Twisted<br>
&gt; version is 1.3.0.<br>
[...]<br>
&gt; About every 4 &quot;refresh&quot;, the memory used by my server increases
by 96k, with<br>
&gt; nor release of memory. I checked the object number by watching len<br>
&gt; (gc.get_objects()), but it is stable.<br>
&gt; Any idea to help me to solve this problem, my server is expected to
run<br>
&gt; continuously.<br>
<br>
There was a leak in the _c_urlarg.c module in 1.3.0, which causes a string<br>
the size of the url to be leaked every request. &nbsp;This doesn't sound
like it<br>
would account for the 96k per 4 requests to me, but perhaps the memory<br>
allocation strategy on QNX explains that.<br>
<br>
Either upgrade to Twisted 2.0 or newer, or grab _c_urlarg.c from that<br>
version or SVN (it's a one-line fix) and recompile it, or just delete the<br>
compiled module -- it'll fall back to the slower pure-python version in
the<br>
standard library, but it won't leak.<br>
<br>
Let us know if that solves it, or at least helps.<br>
<br>
-Andrew.<br>
<br>
<br>
_______________________________________________<br>
Twisted-web mailing list<br>
Twisted-web@twistedmatrix.com<br>
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web<br>
</tt></font>
<br>