Cowboy2 connection timeout

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.



how long does the requests take to complete(estimated)? cowboy2 has a default timeout of 60 secs -

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?

Requests usually take up to one minute to complete.

follow the link above and config phoenix(cowboy) for a much longer timeout than the default 60 secs

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?

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?

My cowboy configuration is below:

Plug.Adapters.Cowboy2.child_spec(scheme: :http, plug: AppServer.Router, options: [port: port, ip: ip])