diff --git a/CHANGELOG.md b/CHANGELOG.md index a7a673a8f..db3e008ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - ActivityPub delivery attempts are spaced out more giving up after 3h instead of ~20min before - inboxes now fake a succcess reply on incoming Delete documents whose signing key is unknown but gone; this prevents older Mastodon from repeatedly trying to deliver Deletes of actors we never knew anyway +- The config option `config :pleroma, :http, :pool_max_idle_time` was removed; it never actually + did anything and was redundant with `config :pleroma, :http, :pool_timeout` which actually works. ## 2025.03 diff --git a/config/config.exs b/config/config.exs index 29108ccb0..fdb29ad52 100644 --- a/config/config.exs +++ b/config/config.exs @@ -181,14 +181,12 @@ # Configures http settings, upstream proxy etc. config :pleroma, :http, - pool_timeout: :timer.seconds(5), + pool_timeout: :timer.seconds(60), receive_timeout: :timer.seconds(15), proxy_url: nil, user_agent: :default, pool_size: 10, - adapter: [], - # see: https://hexdocs.pm/finch/Finch.html#start_link/1 - pool_max_idle_time: :timer.seconds(30) + adapter: [] config :pleroma, :instance, name: "Akkoma", diff --git a/lib/pleroma/http/adapter_helper.ex b/lib/pleroma/http/adapter_helper.ex index 74b0b88f1..99416f53f 100644 --- a/lib/pleroma/http/adapter_helper.ex +++ b/lib/pleroma/http/adapter_helper.ex @@ -6,7 +6,7 @@ defmodule Pleroma.HTTP.AdapterHelper do @moduledoc """ Configure Tesla.Client with default and customized adapter options. """ - @defaults [name: MyFinch, pool_timeout: 5_000, receive_timeout: 5_000] + @defaults [name: MyFinch, pool_timeout: 60_000, receive_timeout: 15_000] @type proxy_type() :: :socks4 | :socks5 @type host() :: charlist() | :inet.ip_address() diff --git a/lib/pleroma/http/adapter_helper/default.ex b/lib/pleroma/http/adapter_helper/default.ex index fc377b376..c5f0ccaab 100644 --- a/lib/pleroma/http/adapter_helper/default.ex +++ b/lib/pleroma/http/adapter_helper/default.ex @@ -10,7 +10,7 @@ defmodule Pleroma.HTTP.AdapterHelper.Default do @spec options(keyword(), URI.t()) :: keyword() def options(opts, _uri) do proxy = Pleroma.Config.get([:http, :proxy_url]) - pool_timeout = Pleroma.Config.get([:http, :pool_timeout], 5000) + pool_timeout = Pleroma.Config.get([:http, :pool_timeout], 60_000) receive_timeout = Pleroma.Config.get([:http, :receive_timeout], 15_000) opts diff --git a/test/pleroma/http/adapter_helper_test.exs b/test/pleroma/http/adapter_helper_test.exs index 0951187aa..798718e25 100644 --- a/test/pleroma/http/adapter_helper_test.exs +++ b/test/pleroma/http/adapter_helper_test.exs @@ -50,7 +50,7 @@ test "should not override conn_opts if set" do describe "timeout settings" do test "should default to 5000/15000" do options = AdapterHelper.options(%URI{host: ~c"somewhere"}) - assert options[:pool_timeout] == 5000 + assert options[:pool_timeout] == 60_000 assert options[:receive_timeout] == 15_000 end