If the environment variable RACK_TIMEOUT_SERVICE_TIMEOUT is set to any value, html2rss-web will fail with the following error:
Puma caught this error: value "0" should be false, zero, or a positive number. (ArgumentError)
/html2rss/vendor/bundle/ruby/3.1.0/gems/rack-timeout-0.6.3/lib/rack/timeout/core.rb:57:in read_timeout_property' /html2rss/vendor/bundle/ruby/3.1.0/gems/rack-timeout-0.6.3/lib/rack/timeout/core.rb:71:in initialize'
/html2rss/vendor/bundle/ruby/3.1.0/gems/roda-3.57.0/lib/roda.rb:393:in new' /html2rss/vendor/bundle/ruby/3.1.0/gems/roda-3.57.0/lib/roda.rb:393:in block in build_rack_app'
/html2rss/vendor/bundle/ruby/3.1.0/gems/roda-3.57.0/lib/roda.rb:391:in reverse_each' /html2rss/vendor/bundle/ruby/3.1.0/gems/roda-3.57.0/lib/roda.rb:391:in build_rack_app'
/html2rss/vendor/bundle/ruby/3.1.0/gems/roda-3.57.0/lib/roda.rb:34:in app' /html2rss/vendor/bundle/ruby/3.1.0/gems/roda-3.57.0/lib/roda.rb:53:in call'
/html2rss/vendor/bundle/ruby/3.1.0/gems/rack-unreloader-2.0.0/lib/rack/unreloader.rb:87:in call' /html2rss/vendor/bundle/ruby/3.1.0/gems/puma-5.6.4/lib/puma/configuration.rb:252:in call'
/html2rss/vendor/bundle/ruby/3.1.0/gems/puma-5.6.4/lib/puma/request.rb:77:in block in handle_request' /html2rss/vendor/bundle/ruby/3.1.0/gems/puma-5.6.4/lib/puma/thread_pool.rb:340:in with_force_shutdown'
/html2rss/vendor/bundle/ruby/3.1.0/gems/puma-5.6.4/lib/puma/request.rb:76:in handle_request' /html2rss/vendor/bundle/ruby/3.1.0/gems/puma-5.6.4/lib/puma/server.rb:441:in process_client'
/html2rss/vendor/bundle/ruby/3.1.0/gems/puma-5.6.4/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
This issue is caused by line 19 of the app.rb retrieving the environment variable without converting it to integer or boolean, and then passing it over to Rack::Timeout:
|
use Rack::Timeout, service_timeout: ENV.fetch('RACK_TIMEOUT_SERVICE_TIMEOUT', 15) |
A simple fix would be to replace line 19 with
use Rack::Timeout
This would leave the envvar parsing up to rack-timeout's initialization function. Also, the default timeout used by rack-timeout(15s) is the same as the one specified in line 19, so there's no need to re-define it.
If the environment variable RACK_TIMEOUT_SERVICE_TIMEOUT is set to any value, html2rss-web will fail with the following error:
This issue is caused by line 19 of the app.rb retrieving the environment variable without converting it to integer or boolean, and then passing it over to Rack::Timeout:
html2rss-web/app.rb
Line 19 in 5aaf00a
A simple fix would be to replace line 19 with
use Rack::TimeoutThis would leave the envvar parsing up to rack-timeout's initialization function. Also, the default timeout used by rack-timeout(15s) is the same as the one specified in line 19, so there's no need to re-define it.