more info in Connections.checkin timout errors

This commit is contained in:
Alexander Strizhakov 2020-02-21 12:53:40 +03:00
commit ad8f26c0a4
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
5 changed files with 23 additions and 14 deletions

View file

@ -115,11 +115,16 @@ defmodule Pleroma.HTTP.Adapter.Gun do
opts
catch
:exit, {:timeout, _} ->
:exit, {:timeout, {_, operation, [_, {method, _}, _]}} ->
messages_len =
:gun_connections
|> Process.whereis()
|> Process.info(:message_queue_len)
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