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? :)

Regards,
Alexander.

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to