Skip to content

Implement --max-keepalive-requests #124

@eserte

Description

@eserte

I would like to see something like Apache's MaxKeepAliveRequests implemented for Starman.

Rationale: on a heavily used server with few clients it is possible that a worker process lives for very long time, even with the default setting of --max-requests=1000. Reason is that --max-requests does not count requests within a keepalive connection.

The implementation is probably quite simple, something like the following in process_request in Starman::Server (untested):

     if (exists $self->{options}->{max_keepalive_requests}) {
         last if ++$keepalive_requests >= $self->{options}->{max_keepalive_requests};
     }
     DEBUG && warn "[$$] Waiting on previous connection for keep-alive request...\n";

If this feature request is accepted, then I would do a formal pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions