appcues / mojito

An easy-to-use Elixir HTTP client, built on the low-level Mint library.
https://hexdocs.pm/mojito/Mojito.html
MIT License
349 stars 34 forks source link

Receiving `{:error, %Mint.TransportError{reason: :timeout}}` #56

Closed lud closed 2 years ago

lud commented 4 years ago

Hello,

When we make a call with mojito that results in {:error, %Mojito.Error{message: nil, reason: :checkout_timeout}}, we receive a message like this: {#Reference<0.981418250.3438280705.26871>, {:error, %Mint.TransportError{reason: :timeout}}} after a while.

It is not a big deal since we can handle those message and ignore them. But shouldn't mojito and mint have the same timeout ?

andyleclair commented 4 years ago

:checkout_timeout means that there's an issue checking a connection out from the pool

gamache commented 4 years ago

This sounds like it could be related to #57; @lud are you sure the messages are connected to the requests that received :checkout_timeout?

lud commented 4 years ago

@gamache unfortunately no, I am not 100% sure. I am not sure what you mean by "connected" but the message was received by the process (a Phoenix.Channel process) that made a request to a local PHP deveserver, ten-ish seconds after the request failed with :checkout_timeout.

ntenczar commented 2 years ago

Hi! This project is now deprecated:

We recommend that you use Finch which is also built on Mint. The creator of Finch has an excellent writeup here describing the problems with Mojito, and as a result we use Finch internally at Appcues now.