<br><font size=2><tt><br>
&gt; I am now working on issue #1662.</tt></font>
<br><font size=2><tt>GREAT!</tt></font>
<br>
<br><font size=2><tt>&gt; ...<br>
&gt; BTW: Benedikt, what did you use, if you did, to trace memory leaks?<br>
&gt; </tt></font>
<br>
<br><font size=2><tt>1. I used &quot;top&quot; to watch the size of the
process.</tt></font>
<br><font size=2><tt>&nbsp; &nbsp;(I think this doesn't help you to break
the problem down)</tt></font>
<br><font size=2><tt>2. I tried to work with mcheck. (At that time you
was &quot;involved&quot; by giving a tip ...)</tt></font>
<br><font size=2><tt>&nbsp; &nbsp;I made it run to produce this mcheck
output. I spent effort in analyzing the </tt></font>
<br><font size=2><tt>&nbsp; &nbsp;mcheck-outputfile. At the end it wasn't
helpful. I forgot the reason. &nbsp; </tt></font>
<br><font size=2><tt>3. Here in my company I have access to rational purify
on Windows.</tt></font>
<br><font size=2><tt>&nbsp; &nbsp;With the approach you described in bug#1664
you will end up with a small(!) </tt></font>
<br><font size=2><tt>&nbsp; &nbsp;C-program. Maybe I could analyze this
program with purify. </tt></font>
<br><font size=2><tt>&nbsp; &nbsp;(BUT: The project where I worked with
mapserver is over. So</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; it is a problem for me to find time
and I don't want to promise </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; anything to be done &quot;in time&quot;.
But I'd *like* to do so ...)</tt></font>
<br>
<br><font size=2><tt>Benedikt</tt></font>
<br><font size=2><tt>&nbsp; &nbsp;<br>
&gt; Regards,<br>
&gt; Umberto<br>
&gt; <br>
&gt; On 2/13/06, Umberto Nicoletti &lt;umberto.nicoletti@gmail.com&gt;
wrote:<br>
&gt; &gt; On 2/13/06, umn-ms@hydrotec.de &lt;umn-ms@hydrotec.de&gt; wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Umberto<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thank you for taking care onon this old but still open issue!<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I created<br>
&gt; &gt; &gt; http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1661 and<br>
&gt; &gt; &gt; http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1662<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Benedikt<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (Sorry! I was not able to add your e-mail-adress to cc.
Bugzilla denied to<br>
&gt; &gt; &gt; do so. I suppose<br>
&gt; &gt; &gt; you can handle this anyway.)<br>
&gt; &gt;<br>
&gt; &gt; I just did. I will send you a patch for the<br>
&gt; &gt; msConnPoolCloseUnreferenced function asap o that you can test
it.<br>
&gt; &gt;<br>
&gt; &gt; Regards,<br>
&gt; &gt; Umberto<br>
&gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Umberto Nicoletti &lt;umberto.nicoletti@gmail.com&gt; schrieb
am 13.02.2006<br>
&gt; &gt; &gt; 10:25:02:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; Benedikt,<br>
&gt; &gt; &gt; &nbsp;&gt; since I am looking this issue would'n t you mind
opening a bug for the<br>
&gt; &gt; &gt; &nbsp;&gt; inclusion of msConnPoolCloseUnreferenced in mapscript
and one for the<br>
&gt; &gt; &gt; &nbsp;&gt; memory leaks (add me to the cc list)?<br>
&gt; &gt; &gt; &nbsp;&gt;<br>
&gt; &gt; &gt; &nbsp;&gt;<br>
&gt; &gt; &gt; &nbsp;&gt; Reagrds,<br>
&gt; &gt; &gt; &nbsp;&gt; Umberto<br>
&gt; &gt; &gt; &nbsp;&gt;<br>
&gt; &gt; &gt; &nbsp;&gt; On 1/2/06, Benedikt Rothe &lt;umn-ms@hydrotec.de&gt;
wrote:<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; Hi list members,<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; From former threads I got the impression,
that there are some folks<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; interested in the Oracle/Mapserver/Java/Tomcat.<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; Therfore I'd like to share experiences I
made with using<br>
&gt; &gt; &gt; Connection-Pooling<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; of<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; Oracle-Connections inside Java/Tomcat.<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; Testenvironment: Mapserver 4.6.2; Suse-Linux;
Tomcat 4.1.31; Sun-Java<br>
&gt; &gt; &gt; 1.4.2<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; Simulating 5 Browsers, which produce maps,
query features, make<br>
&gt; &gt; &gt; selections,<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; query-legend-pics frequently.<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; - After using synchronized &quot;enough&quot;
I didn't have crashes of Tomcat.<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; - Big memory leak: Between the first 5 requests
and the next 100<br>
&gt; &gt; &gt; requests<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; &nbsp;the Tomcat-process became about
400MB bigger. &nbsp;(I use &quot;top&quot; for<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; &nbsp;watching memory-footprint.)<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; - Cleaning the Connection-Pool &quot;by
hand&quot;. This means:<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; Opening the function msConnPoolCloseUnreferenced
in mappool.c<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; for use in Java and call it after
every request.<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; - After this I still have memory leaks:
&nbsp;About 100MB for 30.000<br>
&gt; &gt; &gt; requests.<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; (I also made a test: 25.000 requests
without Connection pooling.<br>
&gt; &gt; &gt; Memory<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; increased<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; &nbsp; and decreased as expected
&nbsp;in this case.)<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; - Performancecomparison in my testcase:<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; Without use of connection-pooling:
~ 50 Request per minute<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; With use of connection-pooling: ~75
Request per minute<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; As a result I have the following encouragements:<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; - Making msConnPoolCloseUnreferenced &nbsp;availabe
for mapscript via swig.<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; (I made a hack by directly editing
mapscript/java/mapscript_wrap.c<br>
&gt; &gt; &gt; and<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; &nbsp;Java-Files in<br>
&gt; &gt; &gt; mapscript/java/edu/umn/gis/mapscript.) I<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; think this<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; function could be part of the mapscript-Object?<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; - Investigations on the memory leaks. Both
leaks shouldn't occure.<br>
&gt; &gt; &gt; (I'll do<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; this, if I find time. but ...)<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; - Fernando Simon: What about using OCI-Connection-Pooling
&nbsp;for oracle<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; instead the mappool.c?<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; http://oraclesvca2.oracle.com/docs/cd/B14117_01/appdev.101/b10779/oci09adv.htm#452244<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; &nbsp; (If you don't have time, I maybe
could help coding. But would it<br>
&gt; &gt; &gt; become<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; part uf Mapserver?)<br>
&gt; &gt; &gt; &nbsp;&gt; &gt;<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; Happy new year to everybody<br>
&gt; &gt; &gt; &nbsp;&gt; &gt; Benedikt Rothe<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
</tt></font>