File_size uplad limit change, task.await timeouts

Hey I am trying to up the file size limit on uploads, I added length to Plug.Parsers, but after that I am getting a new error:

(exit) exited in: Task.await(%Task{owner: #PID<0.743.0>, pid: #PID<0.748.0>, ref: #Reference<0.917833311.3704356865.244368>}, 15000)
    ** (EXIT) time out

I did this so far: http://codebase.site/index.php/question/show_question_details/123

How do I deal with this?

1 Like

I had to add

read_timeout: 120_000

to extend the timeout period

actually it seems like that didn’t work
it times out after 15 seconds no matter what,
where else do i need to change it?

Can you please provide the full stacktrace? Always include as much information as you can in reports, especially error message and stacktrace.

2 Likes

sure, here it goes:

[error] Postgrex.Protocol (#PID<0.453.0>) disconnected: ** (DBConnection.ConnectionError) client #PID<0.620.0> timed out because it queued and checked out the connection for longer than 15000ms
[debug] QUERY ERROR db=0.0ms
rollback []
[error] #PID<0.620.0> running XDEndpoint.Endpoint (cowboy_protocol) terminated
Server: localhost:4000 (http)
Request: POST /topics/7JlDowBJ6BgWP9Aq/post_attachment
** (exit) exited in: Task.await(%Task{owner: #PID<0.620.0>, pid: #PID<0.628.0>, ref: #Reference<0.1493570794.4258004993.159576>}, 15000)
    ** (EXIT) time out

I found this about it: https://github.com/elixir-ecto/ecto/issues/1658
the quesiton is then that if i change my ode according to the link, will i still need the read_timeout in endpoint?

can you post the controller code? obviously you are timing out… but due to what?

I don’t think I am allowed, but as you can see it says that the endpoint is timing out, and mentions cowboy_protocol, but as far as I know there is no change to cowboy, and according to this document:
https://ninenines.eu/docs/en/cowboy/1.0/guide/ws_handlers/
it should default to infinity

Your db connection times out, at least according to the postgrex error.

2 Likes

yes, but i fixed that one, now there is a new error

[error] #PID<0.703.0> running XD.Endpoint (cowboy_protocol) terminated
Server: localhost:4000 (http)
Request: POST /topics/7JlDowBJ6BgWP9Aq/post_attachment
** (exit) exited in: Task.await(%Task{owner: #PID<0.703.0>, pid: #PID<0.710.0>, ref: #Reference<0.1480899467.516685827.49235>}, 15000)
    ** (EXIT) time out

we are dying at this line:


which means that somewhere it is set to 15000, but i only found it in deps

pls post at least pseudo code another time…

are you using arc? in that case https://github.com/stavro/arc/blob/master/lib/arc/actions/store.ex#L57 as well as bumping the db timeout… as you seem to keep an transaction open for the duration…

though I’m merely guessing…

1 Like

Thank you a lot,
Yes I am using arc, but you wouldn’t have known that from the controller XD

there is a new error now, although the time limit is up to 30 sec

[error] Task #PID<0.634.0> started from #PID<0.627.0> terminating
** (stop) exited in: Task.Supervised.stream(30000)
    ** (EXIT) time out
    (elixir) lib/task/supervised.ex:276: Task.Supervised.stream_reduce/7
    (elixir) lib/enum.ex:3015: Enum.reverse/1
    (elixir) lib/enum.ex:2649: Enum.to_list/1
    (ex_aws_s3) lib/ex_aws/s3/upload.ex:88: ExAws.Operation.ExAws.S3.Upload.perform/2
    (arc) lib/arc/storage/s3.ex:57: Arc.Storage.S3.do_put/2
    (elixir) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
    (elixir) lib/task/supervised.ex:35: Task.Supervised.reply/5
    (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Function: #Function<1.78569476/0 in Arc.Actions.Store.async_put_version/3>
    Args: []
[error] Ranch protocol #PID<0.627.0> of listener XD.Endpoint.HTTP (cowboy_protocol) terminated
** (exit) exited in: Task.Supervised.stream(30000)
    ** (EXIT) time out
[error] Postgrex.Protocol (#PID<0.462.0>) disconnected: ** (DBConnection.ConnectionError) client #PID<0.627.0> exited

I added the time limit change to arc and ex_aws configs too

Hi,

Any update on how to resolve this issue?
I am facing the same issue as well.

TIA.

Hey, I am not 100% sure, based on this thread, I have in my arc/waffle config: version_timeout: 60_000.
I think that was it.