summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2024-05-27 11:17:02 -0400
committerMark Felder <feld@feld.me>2024-05-27 11:17:02 -0400
commita50c657427a2dfe9d48c25529a179fe634d30e48 (patch)
treee535a796c0cd8964541a5fecccb05d5729a0ceee
parent6757382abec9ca47a9025b8bed61047414cee20f (diff)
downloadpleroma-a50c657427a2dfe9d48c25529a179fe634d30e48.tar.gz
pleroma-a50c657427a2dfe9d48c25529a179fe634d30e48.zip
Add a dedicated connection pool for Rich Media
Sharing this pool with regular Media is problematic as Rich Media will connect to many different domains and thrash the pool, but regular Media will have predictable connections to the webservers hosting media for the fediverse servers you peer with.
-rw-r--r--config/config.exs9
-rw-r--r--lib/pleroma/web/rich_media/helpers.ex2
2 files changed, 10 insertions, 1 deletions
diff --git a/config/config.exs b/config/config.exs
index 8b9a588b7..b8030651f 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -827,6 +827,11 @@ config :pleroma, :pools,
max_waiting: 20,
recv_timeout: 15_000
],
+ rich_media: [
+ size: 25,
+ max_waiting: 20,
+ recv_timeout: 15_000
+ ],
upload: [
size: 25,
max_waiting: 5,
@@ -847,6 +852,10 @@ config :pleroma, :hackney_pools,
max_connections: 50,
timeout: 150_000
],
+ rich_media: [
+ max_connections: 50,
+ timeout: 150_000
+ ],
upload: [
max_connections: 25,
timeout: 300_000
diff --git a/lib/pleroma/web/rich_media/helpers.ex b/lib/pleroma/web/rich_media/helpers.ex
index 119994458..ea41bd285 100644
--- a/lib/pleroma/web/rich_media/helpers.ex
+++ b/lib/pleroma/web/rich_media/helpers.ex
@@ -58,7 +58,7 @@ defmodule Pleroma.Web.RichMedia.Helpers do
defp http_options do
[
- pool: :media,
+ pool: :rich_media,
max_body: Config.get([:rich_media, :max_body], 5_000_000)
]
end