<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>A little bit more on this. I added some simple printf statements like this:</div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"> (printf "Starting download~n")</font></div><div><font class="Apple-style-span" face="Monaco"> (call-with-input-file ...etc...)</font></div><div><font class="Apple-style-span" face="Monaco"> (printf "Finishing download~n")</font></div><div><br></div><div>After a night's operation, the number of "Start" messages seems to exceed the number of</div><div>"Finish" messages by roughly the number of open file handles. I guess this is to be expected.</div><div>At least there's some hard evidence that it's abrupt disconnections or terminations that are</div><div>leaking resources.</div><div><br></div><div>I guess the questions now are:</div><div><br></div><div> - why are the connections getting terminated (client initiated disconnection?);</div><div> - why is call-with-input-port not sorting itself out (abrupt thread termination?);</div><div> - is there any way I can fix it, even temporarily?</div><div><br></div><div>Cheers,</div><div><br></div><div>-- Dave</div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Regarding the file handles, I presume that are your file handles from<br>call-with-input-file?<br><br>When a servlet runs, its resources are owned by the servlet's<br>custodian, so they are shared by the entire servlet and not just the<br>instance or connection. This means that if you don't free resources,<br>it won't be removed until the servlet is, which only happens when you<br>conf/refresh-servlets.<br><br>Can you track down what kind of file handles are being retained? I<br>don't think that there's a problem with call-with-input-file, but I'd<br>like more info.<br><br>Jay</div></blockquote></div></body></html>