summaryrefslogtreecommitdiff
path: root/config/config.exs
diff options
context:
space:
mode:
authorhref <href@random.sh>2019-01-30 12:38:38 +0100
committerhref <href@random.sh>2019-01-30 15:06:46 +0100
commit4aff4efa8d53988d00381b1346241359cf787e87 (patch)
tree218976087d51f7e1065c7aa966c6530d774e6c11 /config/config.exs
parent97694eb4512da86440e87ce201a631494af6ea6c (diff)
downloadpleroma-4aff4efa8d53988d00381b1346241359cf787e87.tar.gz
pleroma-4aff4efa8d53988d00381b1346241359cf787e87.zip
Use multiple hackney pools
* federation (ap, salmon) * media (rich media, media proxy) * upload (uploader proxy) Each "part" will stop fighting others ones -- a huge federation outbound could before make the media proxy fail to checkout a connection in time. splitted media and uploaded media for the good reason than an upload pool will have all connections to the same host (the uploader upstream). it also has a longer default retention period for connections.
Diffstat (limited to 'config/config.exs')
-rw-r--r--config/config.exs34
1 files changed, 32 insertions, 2 deletions
diff --git a/config/config.exs b/config/config.exs
index 1180a50bc..4dc7a62d7 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -15,6 +15,20 @@ config :pleroma, Pleroma.Captcha,
seconds_valid: 60,
method: Pleroma.Captcha.Kocaptcha
+config :pleroma, :hackney_pools,
+ federation: [
+ max_connections: 50,
+ timeout: 150_000
+ ],
+ media: [
+ max_connections: 50,
+ timeout: 150_000
+ ],
+ upload: [
+ max_connections: 25,
+ timeout: 300_000
+ ]
+
config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
# Upload configuration
@@ -22,7 +36,14 @@ config :pleroma, Pleroma.Upload,
uploader: Pleroma.Uploaders.Local,
filters: [],
proxy_remote: false,
- proxy_opts: []
+ proxy_opts: [
+ redirect_on_failure: false,
+ max_body_length: 25 * 1_048_576,
+ http: [
+ follow_redirect: true,
+ pool: :upload
+ ]
+ ]
config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
@@ -214,7 +235,16 @@ config :pleroma, :mrf_simple,
reject: [],
accept: []
-config :pleroma, :media_proxy, enabled: false
+config :pleroma, :media_proxy,
+ enabled: false,
+ proxy_opts: [
+ redirect_on_failure: false,
+ max_body_length: 25 * 1_048_576,
+ http: [
+ follow_redirect: true,
+ pool: :media
+ ]
+ ]
config :pleroma, :chat, enabled: true