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

[#102] Handle broken pipe errors gracefully in opine #135

Merged
merged 1 commit into from
Aug 1, 2021

Conversation

cmorten
Copy link
Owner

@cmorten cmorten commented Aug 1, 2021

Issue

Fixes #102

Details

  • Handle broken pipe errors when end requests + at server iterator level.
  • Emit errors rather than closing the server.

CheckList

  • PR starts with [#ISSUE_ID].
  • Has been tested (where required).

@cmorten cmorten changed the title feat: handle broken pipe errors gracefully in opine [#102] Handle broken pipe errors gracefully in opine Aug 1, 2021
@cmorten cmorten added the bug Something isn't working label Aug 1, 2021
@cmorten cmorten self-assigned this Aug 1, 2021
@github-actions
Copy link

github-actions bot commented Aug 1, 2021

Benchmark results

PR to merge fix/issue-102-broken-pipe 75af232 -> main
opine: 1 middleware
================================

1 middleware
Running 3s test @ http://localhost:3333/?foo[bar]=baz
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.81ms  750.78us  18.40ms   89.71%
    Req/Sec     1.79k   267.98     2.07k    82.81%
  Latency Distribution
     50%    2.51ms
     75%    2.88ms
     90%    3.58ms
     99%    5.91ms
  11450 requests in 3.21s, 1.66MB read
Requests/sec:   3566.07
Transfer/sec:    529.34KB

opine: 10 middleware
================================

10 middleware
Running 3s test @ http://localhost:3333/?foo[bar]=baz
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.76ms  753.65us  19.25ms   91.21%
    Req/Sec     1.82k   283.11     2.09k    87.10%
  Latency Distribution
     50%    2.49ms
     75%    2.81ms
     90%    3.35ms
     99%    5.76ms
  11323 requests in 3.12s, 1.64MB read
Requests/sec:   3625.65
Transfer/sec:    538.18KB

opine: 50 middleware
================================

50 middleware
Running 3s test @ http://localhost:3333/?foo[bar]=baz
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     3.53ms    1.07ms  26.05ms   90.35%
    Req/Sec     1.43k   196.61     1.64k    85.48%
  Latency Distribution
     50%    3.17ms
     75%    3.61ms
     90%    4.57ms
     99%    8.10ms
  8874 requests in 3.11s, 1.29MB read
Requests/sec:   2849.23
Transfer/sec:    422.93KB

native_http benchmark
================================

Server listening on localhost:3333
Running 3s test @ http://localhost:3333/?foo[bar]=baz
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   494.02us  145.16us   6.65ms   94.71%
    Req/Sec    10.12k     0.89k   10.71k    90.62%
  Latency Distribution
     50%  465.00us
     75%  481.00us
     90%  519.00us
     99%    1.07ms
  64472 requests in 3.20s, 5.35MB read
Requests/sec:  20150.65
Transfer/sec:      1.67MB

std/http benchmark
================================

http://localhost:3333/
Running 3s test @ http://localhost:3333/?foo[bar]=baz
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.17ms  317.71us  10.21ms   91.83%
    Req/Sec     4.28k   566.94     4.72k    87.50%
  Latency Distribution
     50%    1.07ms
     75%    1.13ms
     90%    1.37ms
     99%    2.41ms
  27241 requests in 3.20s, 2.88MB read
Requests/sec:   8512.02
Transfer/sec:      0.90MB

deno_http_native benchmark
================================

Server listening on localhost:3333
Running 3s test @ http://localhost:3333/?foo[bar]=baz
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   462.27us  142.93us   3.97ms   94.62%
    Req/Sec    10.86k     0.97k   11.65k    93.55%
  Latency Distribution
     50%  433.00us
     75%  452.00us
     90%  492.00us
     99%    1.05ms
  67002 requests in 3.10s, 5.56MB read
Requests/sec:  21614.25
Transfer/sec:      1.79MB

@cmorten cmorten merged commit 4f1ccc9 into main Aug 1, 2021
@cmorten cmorten deleted the fix/issue-102-broken-pipe branch August 1, 2021 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] BrokenPipe Crash
1 participant