-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
The restriction on the length of the content with a high RPS #286
Comments
Can you be specific about how you're manipulating the How are you running Rocket? To benchmark the
|
Terminal 1: build default example
Terminal 2: test default example
RPS 42324 :) Terminal 1: change "Hello, world!" to "aaa..." (8057 bytes)
Terminal 2: test 8057 bytes
RPS 39128 :) Terminal 1: change 8057 bytes string to 8058 bytes string
Terminal 2: test 8058 bytes string
RPS 181 :( Terminal 1: errors
|
There are some changes in master related to connection handling. Can you try the same test on master and see if the issue is fixed? I'm not able to reproduce this. |
I tried to test with 1 thread and 11 connections (num_cpu + 3)
and with
here. Panic example:
Please, see full log here. Last 3 connections is broken. In any case, hyper hello_world with same (or greater) Content-Length works correctly. |
@vovagp Can you try with the latest Rocket code, the one in git clone https://github.com/SergioBenitez/Rocket.git
cd Rocket/examples/hello_world
ROCKET_ENV=prod ROCKET_PORT=8000 cargo run --release Then run your |
@SergioBenitez yes, this is last version of Rocket. |
Same errors in Debian 8 (Virtualbox):
What OS are you using? |
@vovagp Your logs indicate that you're not using the code from |
@SergioBenitez This logs from
command. I had to get the backtrace of the error. Ok, I will go to IRC. |
Okay, I was able to reproduce this on Debian. Taking a look at what's causing the issue now. |
@SergioBenitez Ok, i on #rocket channel now. |
Thus far, there is no obvious or semi-obvious issue with Rocket. I started tweaking the parameters of
The last bullet point is the most surprising; why would RPS drop so dramatically when crossing the 8048 boundary? One clue is that Rocket uses So, I considered whether
This means that either |
Update: I was able to replicate this with standalone Hyper (cc @seanmonstar) with this code. As such, if there is an issue, it lies in Hyper. At the moment, given the evidence, I'm inclined to believe that something's going on with |
In Ubuntu 16.04 this code works without errors. Without env_logger: Requests/sec: 94611.31
hyper = "0.10.10"
|
@vovagp Whoops! Sorry, was missing an 'a' there (I removed one to confirm that the issue was indeed occurring). I've updated the gist. |
@SergioBenitez It seems the problem in headers or headers + content length:
Added 1 byte
|
OK, problem seems in 8192 bytes buffer.
8115 + 78 (headers size) = 8193 And wrk resut:
For
result is
|
@vovagp Because the issue occurs with just plain Hyper, it's not the call to |
@SergioBenitez yes, problem with Hyper. I don't think that the problem may be with wrk. We check the backend, not client. For example, Nginx (with Lua or only static) or Netty or Cowboy works fine with wrk. Im sure, it's serverside problem. |
I created new issue hyperium/hyper#1184 |
Looks like this was an issue with Nagle's in Hyper, which still exists but won't be dealt with. We'll deal with this in #17. |
Rocket version 0.2.6
Testing hello_world with wrk get the following results:
Content-Length = 8057B
test completed
Content-Length > 8057B
test completed with error
Failed to write response: Error { repr: Os { code: 32, message: "Broken pipe" } }.
wrk settings:
In any case, in manual mode (low RPS, browser), the server continues to give the page correctly.
The text was updated successfully, but these errors were encountered: