How to get monitoring stats on Erlang Ranch

389 Views Asked by At

I'm new to Elixir. I'm getting timeouts from my Elixir app during load testing. Any idea how to find out, at any point in time, how many connections are open and how many requests are queued up waiting to be processed? I can already see that the node is hitting memory and cpu limits but I wanted more detailed info so I know what to tune.

I know Ranch has a max_connections setting but does it make available stats on how many open connections or or requests queued up?

1

There are 1 best solutions below

0
Onorio Catenacci On BEST ANSWER

You want to use either the ranch:info/0 function or the ranch:procs/2 function to examine the behavior of Ranch in terms of connections.

The function in Elixir syntax would be :ranch.info/0 and :ranch.procs/2

One can find a bit more about these two functions at the ninenines doc page Specifically, take a look at the bottom of that page for more detail on this.