SV: [plt-scheme] Memory leak in web-server 3

From: Petter Egesund (petter.egesund at kunnskapsforlaget.no)
Date: Thu Dec 18 03:51:16 EST 2003

Hi & thanks for ansering!

-- Do use 3m if you are concerned about memory over a long time.

I will - I have allready started to use this version!

-- Do ensure each instance of a servlet either "ends at the bottom"
or calls one of the send functions.

The program tested is one of four examples in the standard plt distribution
:-)

It sure calls a send function, but never reaches the supposed end of the
program in my stress test. The user is supposted to enter two numbers - one
number on one web-page. The problem seems to occur when the user stops after
loading page one - which unfortunately :-) is a very realistic situation?

I have adjusted the timeout without any luck - still leaking!

Cheers,

Petter Egesund


-----Opprinnelig melding-----
Fra: Paul Graunke [mailto:ptg at ccs.neu.edu]
Sendt: 18. desember 2003 07:07
Til: Petter Egesund
Kopi: 'plt-scheme at list.cs.brown.edu'
Emne: Re: [plt-scheme] Memory leak in web-server 3


Do use 3m if you are concerned about memory over a long time.

Do ensure each instance of a servlet either "ends at the bottom"
or calls one of the send functions.

Each time a servlet calls a send/something function, it keeps some
memory on the server until the session times out.  send/finish
will terminate the session programatically and prevent further
backtracking within the session.  send/forward cleans up some of the
memory usage but still allows the session to proceed forward.

You can adjust the default timeout via configuration file or
call adjust-timeout! with a number of seconds.

The memory usage should be roughly
   memory/interaction * interactions/second * timout-seconds
where an interaction is an HTTP request and response.
This assumes the servlet does not use send/finish.

Regards,

Paul
On Wednesday, December 17, 2003, at 05:28 AM, Petter Egesund wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> Hi again :-)
>
> I have tested the web-server with the 3m-memory collector
> (web-server-text3m), but without better results. It did not seg-fault 
> but it
> still eats all the memory on my server - after a while the server can 
> not
> breethe.
>
> This might indicate that the leak happends when the servlet does not 
> end in
> the bottom of the code - where it is supposed to? Has this something 
> to do
> with the continuations-based implementasion?
>
> Or do I need simply need more memory?
>
> Any opinions? I would really, really like to use scheme in our next 
> (larger)
> project!!
>
> Cheers,
>
> Petter Egesund
> ###########################################
>
> This message has been scanned by F-Secure Anti-Virus for Microsoft 
> Exchange.
> For more information, connect to http://www.F-Secure.com/
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/


Posted on the users mailing list.