3

I am trying to find out the no. of active connections to my Sinatra App on Thin Server at any given moment

I realize that Thin provides instance method #size to the Class Thin::Backends::Base http://www.rubydoc.info/github/macournoyer/thin/master/Thin/Backends/Base.

But even on doing the following :-

puts Thin::Backends::Base.size

It is throwing NoMethodError I am using "dashing" - The Sinatra App built by Shopify

1 Answers1

0

Dashing itself keeps track of the EventSource connections in this: Sinatra::Application.settings.connections. If you import sinatra, you should be able to get access to them.

Hope that helps!

tylermauthe
  • 488
  • 4
  • 13