mashton
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.
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Hello,
I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter).
The diffic...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
Anyone here using Honeybadger?
My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of
Bandit.HTTPError...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
Other Trending Topics
This release unifies configuration for queues, repos, and services, swaps opaque timing integers for readable durations, and backports pe...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
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
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
D4no0
There are some more timeouts involved in the
sshclient, like for examplesend_timeoutforgen_tcpthat is used bysshclient.Have you tried running ssh with debug messages logging to console? ssh — OTP 29.0.2 (ssh 6.0.1)
mashton
I’ll give the debug func a shot. My understanding is that the default for
send_timeouthere is:infinity, so I wouldn’t expect that to be the issue here. Is that correct?D4no0
One more thing, I always was using this config option by default for all sftp connections (don’t remember what it is for, copied it over from a sftp wrapper in elixir):
D4no0
Cannot confirm that for sure, I can say though that I used to have problems with sftp connections hanging randomly on some specific servers.
I would also check if the timeout is not coming from OTP when it tries to shutdown the VM gracefully.
mashton
One of the subtleties of this problem is that these timeouts do not occur during normal operation. They only occur during the shutdown.
I’ve added the ssh debug logging as suggested, and I’ll hopefully get some more info from that today.
@D4no0 , as you suggest:
Where would I start digging to find out about this?
I’d also note that the fact that the timeout seems to be 5s, and the default timeout for GenServer.call is 5s, makes me suspicious. But then, why would this only occur during shutdown?
mashton
Sorry, I should have included this in the first place. Here’s the stack trace for the timeout:
and the beginning of the error: