> Hi,
>
> Perhaps, I am doing something wrong, but this code:
>
> ---snip---
> use strict;
> use warnings;
>
> sub streamer {
> my $responder = shift;
> my $writer = $responder->([200, ['Content-Type' => 'text/plain']]);
> $writer->write("Oops...\n");
> $writer->close();
> }
>
> my $app = sub {
> my $env = shift;
> return \&streamer;
> };
> ---snip---
>
> when run as: uwsgi --http-socket :9090 --http-socket-modifier1 5 --psgi
> psgi-streamer.pl --master --disable-logging
> and tortured with: ab -n1000000 -c64 http://127.0.0.1:9090/
>
> produces memory leak - ca. 100M consumed after 1 million requests (-c is
> irrelevant, actually).
>
> When $writer is not used (i.e. $responder called with content), and also
> without streaming (just return with content from app), there is no leak.
>
> uswsgi 2.0.8, compiled on CentOS 7 with "-b psgi" (no Plack::Util
> installed).
>
> So, is it me or a bug? :)
>
>
I tried hard, but i was not able to reproduce it (ubuntu trusty 64bit
default perl).
Can you retry with the --memory-report option and removing
--disable-logging ? You will get the memory used after each request
On my system the RSS is fixed at 4M
If you get memory increase at every request, can you try commenting (only)
this line ?
$writer->write("Oops...\n");
(so writer is allocated and closed, but the string writing is never
accounted)
--
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi