You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm trying to stop Twiggy via SIGQUIT and there's no load, it exits just fine.
However, if old requests take long enough and new ones keep coming, the server keeps listening infinitely.
Here's a sample application:
#!/usr/bin/perluse strict;
use warnings;
use AnyEvent::Strict;
# terminate in 5 secmy$tm = AE::timer 5, undef, sub{ kill"QUIT", $$; warn"Killed"; };
END { undef$tm; warn"Exitting"; };
# The app: reply with an OK in 5 seconds.my$count;
my$app = sub {
returnsub {
my$cb = shift;
my$iter = ++$count;
warn"got request $iter";
my$tm;
$tm = AE::timer 5, undef, sub {
warn"done request $iter";
$cb->( [200, [],[]] ); undef$tm;
};
};
};
% twiggy app.psgi # this exits in 5 seconds
% twiggy app.psgi & while sleep 1; do curl http://localhost:5000 & done
# this runs until Ctrl-C is pressed
# then exits normally (after serving 5 last requests)
The text was updated successfully, but these errors were encountered:
When I'm trying to stop Twiggy via SIGQUIT and there's no load, it exits just fine.
However, if old requests take long enough and new ones keep coming, the server keeps listening infinitely.
Here's a sample application:
The text was updated successfully, but these errors were encountered: