[Melbourne-pm] Monitoring Starman apps

Toby Corkindale toby.corkindale at strategicdata.com.au
Wed Mar 14 16:33:34 PDT 2012


On 14/03/12 18:14, Andrew McN wrote:
> Measure the number of open sockets perhaps? Some limitation die to
> keep-Alive sockets.
>
> Sockets are probably better than looking at process states, but that's
> also possible.

I considered this, but there are many states sockets can be in, and not 
all of them indicate that a process is held open for them.
(ie. There are pending open and pending close states which are handled 
in the kernel)

I have also considered using an IPC semaphore flag, which you can 
atomically increment or decrement from any process, so you could put 
increments and decrements in appropriate parts of your code..

but I was really hoping that someone else had already created all of 
this! Surely monitoring the number of active Starman processes is an 
important metric for anyone using it in production?

-Toby

> On Mar 14, 2012 5:59 PM, "Toby Corkindale"
> <toby.corkindale at strategicdata.com.au
> <mailto:toby.corkindale at strategicdata.com.au>> wrote:
>
>     Hi,
>     Starman, a Plack webserver, is configured to have a certain number
>     of worker children, which it forks. You may be familiar with the
>     concept from using Apache and configuring it to have a min/max of
>     workers? Well, on Starman it's fixed. (Which is probably better, as
>     you're not going to get into situations where the number of workers
>     spirals out of control due to lengthening request durations due to
>     larger numbers of workers.)
>
>     Anyway.. I want to have some way to measure how many processes are
>     active at once, so I can tell when we're getting close to saturating
>     the current number of workers.
>
>     I could hack up a script that runs regularly, and counts the number
>     of established connections to port 8080 or whatever, but.. surely
>     this kind of thing has already been done?
>
>     Any words of wisdom from the crowd?
>
>
>     Cheers,
>     Toby
>     _________________________________________________
>     Melbourne-pm mailing list
>     Melbourne-pm at pm.org <mailto:Melbourne-pm at pm.org>
>     http://mail.pm.org/mailman/__listinfo/melbourne-pm
>     <http://mail.pm.org/mailman/listinfo/melbourne-pm>
>


-- 
.signature


More information about the Melbourne-pm mailing list