Skip to content

http-server example seems to hang under ApacheBench #5

Description

@rryan

First off, thanks for mioco!

Steps to reproduce from b8cc872 (macOS 10.12.4, macbook pro with 4 cores):

$ cargo build --example http-server
$ target/debug/examples/http-server&
$ ab http://127.0.0.1:5555/

This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)...apr_pollset_poll: The timeout specified has expired (70007)
Total of 1 requests completed

Sending single requests via telnet or Chrome works fine. I think it has to do with not closing the connection here: https://github.com/dpc/mioco/blob/master/examples/http-server.rs#L68

If I add a return Ok(()) there, ab works intermittently. It hangs every few requests.

Activity

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

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