Discussion:
IdHttpServer memory leaks?
(too old to reply)
API
2008-06-20 07:59:23 UTC
Permalink
Trying to figure out what's happening
with the IdHttpServer now. Here's some
details of the issue:

1) Using snapshot 10.2.3 of 19/6/08
2) IdHttpServer is started into sessions
state with session timeout set to 30s
3) Build the application using FastMM4
4) When ever the GET event is triggered
the client is served ok the file
requested, but..

5) On every new connection done, new
thread is created by the IdServer.

6) Sessions were finished when the
timeout was elapsed ok (at least the
event was fired)

7) Still, when there's no sessions, no
anything, EVEN the server state were
turned to FALSE there's
IdCriticalSections, IdYarns, IdBuffers
and IdContexts still that is reported
leaked.

Why is this?
API
2008-06-20 10:16:18 UTC
Permalink
This is now only thing put into the GET
method of the IdHttpserver :

begin
aresponseinfo.contenttype:= 'text/html';
aresponseinfo.ContentText:=
'<html><body>Only contents on this
server '+showdoc+'</body></html>';
aresponseinfo.ContentLength:=
length(aresponseinfo.ContentText);
end;

and of course those autostartsession and
sessiontimeouts are set, still even the
server is de-activated -> all threads
are still in memory on shutting down the
application.

Any idea of what is happening? On which
setting should I do something?

/A
API
2008-06-20 18:57:53 UTC
Permalink
Found the cause. This probably was
because I didn't know how to use the
thread pool correctly. When removed the
tread pool component from the form (and
from the http server too of course)
memory leaks were fixed.

/Ari

Remy Lebeau (TeamB)
2008-06-20 16:44:49 UTC
Permalink
when there's no sessions, no anything, EVEN the
server state were turned to FALSE there's
IdCriticalSections, IdYarns, IdBuffers and IdContexts
still that is reported leaked.
Please show the leak report.


Gambit
Loading...