Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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