Closed alexandremcosta closed 2 years ago
are you using the same timeout settings for mojito and httpoison? the server is http2 so maybe it is a http2 issue. you can disable http2 in mojito.
@alexandremcosta Hi, thank you for the bug report! I just tried running this code against the latest master (Elixir 1.12.1 and Erlang 24.0.2) and I didn't see it fail. Can you try to reproduce it locally again with master? I'd love some more information if maybe there's a version incompatibility or something
Sorry, I should have tried other inputs before I said anything! I wasn't able to reproduce that error, but when I called Bug.reproduce(100_000)
eventually I got
error: {:error,
%Mojito.Error{
message: nil,
reason: %Mint.HTTPError{module: Mint.HTTP2, reason: :closed_for_writing}
}}
Which does seem like something we should resolve!
I think we hit this very issue at work. It got so bad we had to switch to HTTPoison, at least for now. Unfortunately I don't know why it happens.
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.
Mojito returns
{:error, %Mojito.Error{message: nil, reason: :timeout}}
intermittently. It's rare, but it happens in our production system and it will be impossible to keep using Mojito with this problem.I used this to reproduce. It takes sometime, but eventually you will see it:
It never happens on
Bug.reproduce(10000, HTTPoison)
. I'm on 0.7.7 and my config is default.