2

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?

Onorio Catenacci
  • 14,928
  • 14
  • 81
  • 132
enamrik
  • 2,292
  • 2
  • 27
  • 42
  • Would http://erlang.org/doc/man/observer.html be of any help to you ? – Kernael Mar 29 '18 at 10:05
  • @Kernael Not really but thanks though. I need realtime monitoring of the number of connections and requests queued up. I'm looking at the Ranch source to see what I find. – enamrik Mar 29 '18 at 12:04
  • @OnorioCatenacci you're right, probably didn't craft my google queries right. Thanks for helping out though. Mind adding your comment as a question so I can accept it? So if someone else is searching using the keywords I used, they'll find this page and not ask a question. – enamrik Mar 30 '18 at 20:36
  • It's added. I've removed the downvote. – Onorio Catenacci Mar 30 '18 at 21:15

1 Answers1

2

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.

Onorio Catenacci
  • 14,928
  • 14
  • 81
  • 132