-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
current process crashes when downloading fle #89
Comments
Hi there, any update on this? can i help fixing this? (I think it would need |
the same happens with |
A proposed solution would be something like this, it will have the same current behavior but with the advantage that can be rescued NOTE: we would need a way to pass the name of the def perform(op, config) do
with {:ok, op} <- Upload.initialize(op, config) do
stream = Stream.with_index(op.src, 1)
TaskSupervisor
|> Task.Supervisor.async_stream_nolink(
stream,
Upload,
:upload_chunk!,
[Map.delete(op, :src), config],
max_concurrency: Keyword.get(op.opts, :max_concurrency, 4),
timeout: Keyword.get(op.opts, :timeout, 30_000)
)
|> Enum.map(fn
{:ok, val} -> val
{:exit, {error, _}} -> raise error
end)
|> Upload.complete(op, config)
end
end |
We're seeing the same thing in our system too:
My first thought was maybe pool exhaustion. Any thoughts on this @edgurgel? |
@jimsynz i think |
Yeah. Looking at https://github.com/benoitc/hackney/issues/ it looks like there has been a bunch of problems with the default pool of late. |
Environment
mix deps | grep hackney
Current behavior
Hi when trying to download multiple files at once i'm getting the following error, the problem is that it seems that is causing the current process to crash as is not returning an error tuple, i think is because at download operation
async_stream
is being used and that links to current process, but not sure if thats the reason see https://github.com/ex-aws/ex_aws_s3/blob/master/lib/ex_aws/s3/download.ex#L71-L93 and from docshttps://hexdocs.pm/elixir/Task.html#async_stream/5
besides of that i'm not seeing any other stack trace, error log or anything that helps me better diagnose the problem, but at current process i'm logging errors and also i tried rescuing without success so that's why i think this may be the reason
Expected behavior
to not crash current process, but instead return error tuple
The text was updated successfully, but these errors were encountered: