mashton
Unexpected :ssh_sftp :timeout after SIGINT
I’m trying to understand an unexpected :timeout during :ssh_sftp.start_channel/3. This is the flow of events:
- A Broadway pipeline is running, using a BroadwayKafka producer
- The application receives SIGINT and starts to shutdown
- Broadway batchers execute
Broadway.handle_batch/4, kicking off a series of synchronous events - The last of which is writing a file to a remote SFTP server
The precise timing:
- SIGINT received: 15:39:26.382
- First SFTP connection attempted: 15:39:27.618
- First SFTP connection timeout: 15:39:32.620
- The last Kafka consumer leaves the group and the app exits with
0: 15:39:52.711
So the connection “times out” before the app fully shuts down.
I have two threads I’m not sure how to pull on any further:
- The fact that the timeouts occur about exactly 5s after the attempt makes me think there’s some other underlying timeout. But why would we only hit this timeout on SIGINT?
- Maybe
:timeoutis a misleading error here and there’s something else going on entirely
Anybody have any ideas? I’m hoping there’s a magic “Ah you forgot about !” solution here.
First Post!
D4no0
There are some more timeouts involved in the ssh client, like for example send_timeout for gen_tcp that is used by ssh client.
Have you tried running ssh with debug messages logging to console? ssh — OTP 29.0.2 (ssh 6.0.1)
0
Last Post!
mashton
Sorry, I should have included this in the first place. Here’s the stack trace for the timeout:
[
{:gen_server, :call, 2, [file: ~c"gen_server.erl", line: 370]},
{:ssh_transport, :default_algorithms, 0, [file: ~c"ssh_transport.erl", line: 96]},
{:ssh_options, :default, 1, [file: ~c"ssh_options.erl", line: 727]},
{:ssh_options, :default, 1, [file: ~c"ssh_options.erl", line: 602]},
{:ssh_options, :handle_options, 3, [file: ~c"ssh_options.erl", line: 184]},
{:ssh, :connect, 4, [file: ~c"ssh.erl", line: 187]},
{:ssh_sftp, :start_channel, 3, [file: ~c"ssh_sftp.erl", line: 200]},
{MyApp.SftpClient, :start, 1, [file: ~c"lib/sftp_client.ex", line: 59]}
]
and the beginning of the error:
{:timeout, {:gen_server, :call, [:application_controller, {:set_env, :ssh, :"$def-algs$", ... (a long list of encryption algs, presumably configuration)...
0
Popular in Questions
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
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
New
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
In templates/appointment/index.html.eex:
<%= for appointment <- @appointments do %>
<tr>
<td><%= appoi...
New
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: )
Hello all, this is ...
New
Other popular topics
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
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
New
Lets say I have map like this fetching from my database
%{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
Hello everyone,
Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









