jerry
November 4, 2019, 7:15pm
1
I have two different elixir applications on the same server.
One applications sends about 100 http requests per minute to the other application on the same server.
I am, however, experiencing a situation where some of the requests time out and do not get to the other application where they are being sent.
What do I have to do?
Could it be an issue with the number of connections Cowboy2 can accept?
Please help.
Thanks.
Jerry
outlog
November 4, 2019, 7:29pm
2
how long does the requests take to complete(estimated)? cowboy2 has a default timeout of 60 secs - https://github.com/phoenixframework/phoenix/issues/3190
else I would think you should look for timeout on the client side? what http client are you using and how is the client config’ed?
jerry
November 4, 2019, 7:32pm
3
Requests usually take up to one minute to complete.
outlog
November 4, 2019, 7:50pm
4
follow the link above and config phoenix(cowboy) for a much longer timeout than the default 60 secs
jerry
November 4, 2019, 8:05pm
5
The links haven’t helped much.
How do I alter the connection parameters of Cowboy to increase the number of connections that can be accepted at a time?
outlog
November 4, 2019, 8:14pm
6
can you post the log with the timeout? both the client and the server pls…
you have to identify what is timing out.
cowboy can accept plenty of connections so shouldn’t be that… what is the server doing? anything with the DB? anything that can timeout on it’s own?
jerry
November 4, 2019, 8:15pm
7
My cowboy configuration is below:
Plug.Adapters.Cowboy2.child_spec(scheme: :http, plug: AppServer.Router, options: [port: port, ip: ip])