projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a03c420
)
more info in Connections.checkin timout errors
author
Alexander Strizhakov
<alex.strizhakov@gmail.com>
Fri, 21 Feb 2020 09:53:40 +0000
(12:53 +0300)
committer
Alexander Strizhakov
<alex.strizhakov@gmail.com>
Fri, 21 Feb 2020 09:53:40 +0000
(12:53 +0300)
lib/pleroma/http/adapter/gun.ex
patch
|
blob
|
history
test/http_test.exs
patch
|
blob
|
history
test/pool/connections_test.exs
patch
|
blob
|
history
test/reverse_proxy/client/tesla_test.exs
patch
|
blob
|
history
test/reverse_proxy/reverse_proxy_test.exs
patch
|
blob
|
history
diff --git
a/lib/pleroma/http/adapter/gun.ex
b/lib/pleroma/http/adapter/gun.ex
index f1018dd8d79a11336dd008e7dd3e9d634f0c9890..fc40b324a748b2b23942c4bf6e9df1857ba41ea7 100644
(file)
--- a/
lib/pleroma/http/adapter/gun.ex
+++ b/
lib/pleroma/http/adapter/gun.ex
@@
-115,11
+115,16
@@
defmodule Pleroma.HTTP.Adapter.Gun do
opts
catch
opts
catch
- :exit, {:timeout, _} ->
+ :exit, {:timeout, {_, operation, [_, {method, _}, _]}} ->
+ messages_len =
+ :gun_connections
+ |> Process.whereis()
+ |> Process.info(:message_queue_len)
+
Logger.warn(
Logger.warn(
- "Gun connections pool checkin with timeout error
#{uri.scheme}://
#{
- Connections.compose_uri(uri)
- }"
+ "Gun connections pool checkin with timeout error
for #{operation} #{method}
#{
+ uri.scheme
+ }
://#{Connections.compose_uri(uri)}. Messages length: #{messages_len}
"
)
opts
)
opts
diff --git
a/test/http_test.exs
b/test/http_test.exs
index d80b96496d455914d14914e80ed0d51a2c971ac4..83c27f6e164d9c58066a308a91de578a1e758f22 100644
(file)
--- a/
test/http_test.exs
+++ b/
test/http_test.exs
@@
-61,8
+61,8
@@
defmodule Pleroma.HTTPTest do
describe "connection pools" do
@describetag :integration
describe "connection pools" do
@describetag :integration
- clear_config(
[Pleroma.Gun.API]
) do
- Pleroma.Config.put(
[Pleroma.Gun.API]
, Pleroma.Gun)
+ clear_config(
Pleroma.Gun.API
) do
+ Pleroma.Config.put(
Pleroma.Gun.API
, Pleroma.Gun)
end
test "gun" do
end
test "gun" do
diff --git
a/test/pool/connections_test.exs
b/test/pool/connections_test.exs
index 6f0e041ae7a7640b8675c55720c758cb58a388d5..d0d711c55da607aec1bc41a1c622ae64afe726ee 100644
(file)
--- a/
test/pool/connections_test.exs
+++ b/
test/pool/connections_test.exs
@@
-15,6
+15,10
@@
defmodule Pleroma.Pool.ConnectionsTest do
:ok
end
:ok
end
+ clear_config([:connections_pool, :retry]) do
+ Pleroma.Config.put([:connections_pool, :retry], 5)
+ end
+
setup do
name = :test_connections
adapter = Application.get_env(:tesla, :adapter)
setup do
name = :test_connections
adapter = Application.get_env(:tesla, :adapter)
@@
-429,8
+433,8
@@
defmodule Pleroma.Pool.ConnectionsTest do
describe "integration test" do
@describetag :integration
describe "integration test" do
@describetag :integration
- clear_config(
[API]
) do
- Pleroma.Config.put(
[API]
, Pleroma.Gun)
+ clear_config(
API
) do
+ Pleroma.Config.put(
API
, Pleroma.Gun)
end
test "opens connection and reuse it on next request", %{name: name} do
end
test "opens connection and reuse it on next request", %{name: name} do
diff --git
a/test/reverse_proxy/client/tesla_test.exs
b/test/reverse_proxy/client/tesla_test.exs
index 75a70988c6c912cfdeac58461c4fde1eb8247d49..231271b0d29dacd8e96417d89d0a4e40288d3c56 100644
(file)
--- a/
test/reverse_proxy/client/tesla_test.exs
+++ b/
test/reverse_proxy/client/tesla_test.exs
@@
-8,8
+8,8
@@
defmodule Pleroma.ReverseProxy.Client.TeslaTest do
alias Pleroma.ReverseProxy.Client
@moduletag :integration
alias Pleroma.ReverseProxy.Client
@moduletag :integration
- clear_config_all(
[Pleroma.Gun.API]
) do
- Pleroma.Config.put(
[Pleroma.Gun.API]
, Pleroma.Gun)
+ clear_config_all(
Pleroma.Gun.API
) do
+ Pleroma.Config.put(
Pleroma.Gun.API
, Pleroma.Gun)
end
setup do
end
setup do
diff --git
a/test/reverse_proxy/reverse_proxy_test.exs
b/test/reverse_proxy/reverse_proxy_test.exs
index 1ab3cc4bb60436b3e27f0f491d80606eb8576c39..f61fc02c513e9d822cad195656ede0f0dfd1666c 100644
(file)
--- a/
test/reverse_proxy/reverse_proxy_test.exs
+++ b/
test/reverse_proxy/reverse_proxy_test.exs
@@
-345,12
+345,12
@@
defmodule Pleroma.ReverseProxyTest do
describe "tesla client using gun integration" do
@describetag :integration
describe "tesla client using gun integration" do
@describetag :integration
- clear_config(
[Pleroma.ReverseProxy.Client]
) do
- Pleroma.Config.put(
[Pleroma.ReverseProxy.Client]
, Pleroma.ReverseProxy.Client.Tesla)
+ clear_config(
Pleroma.ReverseProxy.Client
) do
+ Pleroma.Config.put(
Pleroma.ReverseProxy.Client
, Pleroma.ReverseProxy.Client.Tesla)
end
end
- clear_config(
[Pleroma.Gun.API]
) do
- Pleroma.Config.put(
[Pleroma.Gun.API]
, Pleroma.Gun)
+ clear_config(
Pleroma.Gun.API
) do
+ Pleroma.Config.put(
Pleroma.Gun.API
, Pleroma.Gun)
end
setup do
end
setup do