Skip to content

implement --max-keepalive-requests (issue #124)#125

Open
eserte wants to merge 1 commit intomiyagawa:masterfrom
eserte:master
Open

implement --max-keepalive-requests (issue #124)#125
eserte wants to merge 1 commit intomiyagawa:masterfrom
eserte:master

Conversation

@eserte
Copy link

@eserte eserte commented Jul 6, 2017

No tests for this change. One problem is that test_psgi() does not offer an easy way to set the server options (or I did not found out how). Here's a seperate commit which implements a test with too much code for my taste: eserte@0dbde80

The change may be manually tested using strace:

  • start the server with your favorite app and some --max-keepalive-requests and --max-requests setting:
perl -Mblib script/starman --max-keepalive-requests=7 --max-requests=3 your_favorite.psgi
  • run a keep-alive client with strace just filtering the connect() syscalls --- depending on the server configuration there should be just one connect() to the server (no --max-keepalive-requests setting, --max-requests setting irrelevant) or many connect() calls
strace -econnect perl -MLWP::UserAgent -e '$ua=LWP::UserAgent->new(keep_alive=>1); for (1..9) { die if !$ua->get("http://localhost:5000")->is_success }'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant