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

Bombardier returns error: the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection - 1 #56

Closed
Ushanta opened this issue Mar 8, 2020 · 1 comment

Comments

@Ushanta
Copy link

Ushanta commented Mar 8, 2020

I downloaded bombardier-windows-amd64.exe from the home page. There's no version info.

I have an ASPNET Core Web API. I am querying a POST method that accepts JSON. The POST responds with Status Code 201 if successful. I am using Bombardier locally to test the app - Windows 10 Pro OS.

I ran Bombardier with the following flags and the results are fine (my requests are large json files):
.\bombardier-windows-amd64.exe -m POST -f <myjsonfile.json> https://localhost:44384/api/run/sample -n 7000 -c 40 -H 'Content-Type: application/json'
Bombarding https://localhost:44384/api/run/sample with 7000 request(s) using 40 connection(s)
7000 / 7000 [====================] 100.00% 409/s 17s
Done!
Statistics Avg Stdev Max
Reqs/sec 409.96 365.59 2105.33
Latency 96.16ms 32.23ms 653.25ms
HTTP codes:
1xx - 0, 2xx - 7000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 2.84MB/s

Then ran it again but changed the number of requests to 1 and concurrent connections to 1 as well:
.\bombardier-windows-amd64.exe -m POST -f <myjsonfile.json> http://localhost:44384/api/run/sample -n 1 -c 1 -H 'Content-Type: application/json' -p i,p,r
Bombarding http://localhost:44384/api/run/sample with 1 request(s) using 1 connection(s)
1 / 1 [=====================================================] 100.00% 4/s 0s
Done!
Statistics Avg Stdev Max
Reqs/sec 249.75 0.00 499.50
Latency 23.97ms 0.00us 23.97ms
HTTP codes:
1xx - 0, 2xx - 0, 3xx - 0, 4xx - 0, 5xx - 0
others - 1
Errors:
the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection - 1
Throughput: 1.26MB/s

I expected that the second call would be successful and return a 201.

But; it has an error:
the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection - 1
Throughput: 1.26MB/s

Here's the output for 1, 625, 7000 requests:
.\bombardier-windows-amd64.exe -m POST -f <myjsonfile.json> http://localhost:44384/api/run/sample -n 1 -c 1 -H 'Content-Type: application/json' -p i,p,r
Bombarding http://localhost:44384/api/run/sample with 1 request(s) using 1 connection(s)
1 / 1 [===============================================================================================] 100.00% 4/s 0s
Done!
Statistics Avg Stdev Max
Reqs/sec 249.75 0.00 499.50
Latency 23.97ms 0.00us 23.97ms
HTTP codes:
1xx - 0, 2xx - 0, 3xx - 0, 4xx - 0, 5xx - 0
others - 1
Errors:
the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection - 1
Throughput: 1.26MB/s

.\bombardier-windows-amd64.exe -m POST -f <myjsonfile.json> http://localhost:44384/api/run/sample -n 625 -c 5 -H 'Content-Type: application/json' -p i,p,r
Bombarding http://localhost:44384/api/run/sample with 625 request(s) using 5 connection(s)
625 / 625 [=========================================================================================] 100.00% 282/s 2s
Done!
Statistics Avg Stdev Max
Reqs/sec 296.14 84.83 526.34
Latency 16.92ms 3.06ms 40.00ms
HTTP codes:
1xx - 0, 2xx - 0, 3xx - 0, 4xx - 0, 5xx - 0
others - 625
Errors:
the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection - 625
Throughput: 8.91MB/s

.\bombardier-windows-amd64.exe -m POST -f <myjsonfile.json> https://localhost:44384/api/run/sample -n 7000 -c 40 -H 'Content-Type: application/json' -s
Bombarding https://localhost:44384/api/run/sample with 7000 request(s) using 40 connection(s)
7000 / 7000 [======================================================================================] 100.00% 378/s 18s
Done!
Statistics Avg Stdev Max
Reqs/sec 377.67 332.90 1947.40
Latency 103.79ms 27.69ms 448.00ms
HTTP codes:
1xx - 0, 2xx - 7000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 2.63MB/s

@Ushanta Ushanta closed this as completed Mar 8, 2020
@Ushanta
Copy link
Author

Ushanta commented Mar 8, 2020

It's the URL :(

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

No branches or pull requests

1 participant