derek-zhou

derek-zhou

:ssl_closed message received during web API calls

I am seeing this in my log:

...
    (stdlib 3.7.1) gen_server.erl:637: :gen_server.try_dispatch/4
    (stdlib 3.7.1) gen_server.erl:711: :gen_server.handle_msg/6
    (stdlib 3.7.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: {:ssl_closed, {:sslsocket, {:gen_tcp, #Port<0.156>, :tls_connection, :undefined}, [#PID<0.2810.0>, #PID<0.2809.0>]}}

And the process crashed. The process was doing some outbound web api calls with HTTPosion prior to the crash, and I guess it hit some tricky spot. I understand web API can fail, however, why does it fail this way? and am I supposed to catch this?

Marked As Solved

al2o3cr

al2o3cr

The messages look like the ones in this Hackney bug:

https://github.com/benoitc/hackney/issues/464

I’ve seen these infrequently in production (one per thousands of outgoing HTTP requests) so it’s hard to troubleshoot, but AFAIK they are “leftovers” from previously-used connections and don’t affect operations. To stop them crashing my GenServers, I added a handle_info that logged about it and went on with life.

Where Next?

Popular in Questions Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs &amp; Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130286 1222
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44532 311
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44139 214
New

We're in Beta

About us Mission Statement