Skip to content

"Connection reset" error in TechEmpower benchmarks #317

@p8

Description

@p8

The Falcon Rack implementation in the TechEmpower bench raises the following errors:

    with unhandled exception.","event":{"type":"failure","root":"/rack","class":"Errno::ECONNRESET","message":"Connection reset by peer","backtrace":[
    /usr/local/lib/ruby/3.5.0+0/socket.rb:457:in 'BasicSocket#__read_nonblock'
    /usr/local/lib/ruby/3.5.0+0/socket.rb:457:in 'BasicSocket#read_nonblock'
    /usr/local/bundle/gems/io-stream-0.10.0/lib/io/stream/buffered.rb:138:in 'IO::Stream::Buffered#sysread'
    /usr/local/bundle/gems/io-stream-0.10.0/lib/io/stream/readable.rb:347:in 'IO::Stream::Readable#fill_read_buffer'
    /usr/local/bundle/gems/io-stream-0.10.0/lib/io/stream/readable.rb:268:in 'IO::Stream::Readable#gets'
    /usr/local/bundle/gems/protocol-http1-0.35.1/lib/protocol/http1/connection.rb:356:in 'Protocol::HTTP1::Connection#read_line?'
    /usr/local/bundle/gems/protocol-http1-0.35.1/lib/protocol/http1/connection.rb:378:in 'Protocol::HTTP1::Connection#read_request_line'
    /usr/local/bundle/gems/protocol-http1-0.35.1/lib/protocol/http1/connection.rb:399:in 'Protocol::HTTP1::Connection#read_request'
    /usr/local/bundle/gems/async-http-0.91.0/lib/async/http/protocol/http1/request.rb:26:in 'Async::HTTP::Protocol::HTTP1::Request.read'
    /usr/local/bundle/gems/async-http-0.91.0/lib/async/http/protocol/http1/server.rb:49:in 'Async::HTTP::Protocol::HTTP1::Server#next_request'
    /usr/local/bundle/gems/async-http-0.91.0/lib/async/http/protocol/http1/server.rb:66:in 'Async::HTTP::Protocol::HTTP1::Server#each'
    /usr/local/bundle/gems/async-http-0.91.0/lib/async/http/server.rb:49:in 'Async::HTTP::Server#accept'
    /usr/local/bundle/gems/falcon-0.52.3/lib/falcon/server.rb:57:in 'Falcon::Server#accept'
    /usr/local/bundle/gems/io-endpoint-0.15.2/lib/io/endpoint/wrapper.rb:216:in 'block (2 levels) in IO::Endpoint::Wrapper#accept'
    /usr/local/bundle/gems/async-2.32.0/lib/async/task.rb:207:in 'block in Async::Task#run'
    /usr/local/bundle/gems/async-2.32.0/lib/async/task.rb:452:in 'block in Async::Task#schedule'

The log can be found here (it's 56 MB):
https://tfb-status.techempower.com/unzip/results.2025-09-18-05-29-59-113.zip/results/20250910230442/rack-falcon/run/rack-falcon.log

The tests can be run with the following command:

./tfb --test rack-falcon

If I change the configuration to use non-persistent HTTP, the errors no longer occur but things get 10 times slower.

rack hostname do
   endpoint Async::HTTP::Endpoint.parse('http://0.0.0.0:8080').with(
     protocol: Async::HTTP::Protocol::HTTP1.new(persistent: false)
   )
 end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions