[Mono-list] mod_mono process list

Ben Clewett ben at roadrunner.uk.com
Mon Nov 3 08:59:36 EST 2008



Hi Joshua,

Joshua Tauberer wrote:
> Oh, maybe I misunderstood--- are you talking about seeing many Apache 
> httpd processes or many mod-mono-server processes?

Yes this is what I mean, sorry to confuse.

>> Therefore I have to obtain a list of what mod_mono is calling so I can trace our problem. 
> ...
>> I may have to look at the mod_mono source code to try and get a result 
>> if non is available now!
> 
> What about the Apache server-status handler? It'll tell you what is 
> being processed (as well as a bit of what was recently processed).

Thought about that, but rather get as close as possible to the problem. 
  It may just be that mod_mono can help/hinder this problem, so would be 
happier to work in this code space :)

> 
> There's nothing doing it now in mod_mono. If you really need that and if 
> you're up for it, there are two paths:
> 
> Store the active request URIs in mod_mono, by revising the shared memory 
> dashboard struct so it has a fixed area to store that information.

This is my feeling.  I was thinking of a simple linked-list to store the 
URL.  As use POST method, would need headers as well:

typedef struct mono_live_process {
   int id;
   time_t start;
   const char *url;
   const char *header;
   char flag;  // p = process, w = wait etc...
   mono_live_process *next;
} mono_live_process;

Then manage this list with the lifetime of the process.

I have never allocated memory to shared memory.  Not sure if this is 
feasible, especially using a linked-list.  I guess I allocate a meg or 
so to shared, and allocate this buffer internally my self, being careful 
not to exceed the limit...

I also noted that there must be the 'wait' buffer somewhere for the 
waiting processes.  This must already have a similar structure.  I could 
replicate/expand this for my 'process' buffer.

Then just a option on the dash-board to dump the information...

Sound like the right sort of thing?

> 
> Store the active request URIs in mod-mono-server and add a command so 
> mod_mono can request the information from mod-mono-server. Doesn't have 
> a fixed limitation on what it can store like the other way, but making 
> the communication work is much harder.

I think that adding my own commands to the mod_mono protocol might be a 
road to disaster...  But I can see how this would work...

> 
>> (Which will also allow me to make an XML version of the mod_mono Control 
>> Panel for easier reading of the displayed metrics in 2.0.1...)
> 
> Can you just make the control panel xHTML and perhaps add some 
> additional tags and attributes?

Yes, excelent idea.  Would work far better :)

Thanks,

Ben


> 
> Josh
> 
>> Thanks for the advise,
>>
>> Ben
>>
>>
>>
>> Joshua Tauberer wrote:
>>> Ben Clewett wrote:
>>>> We are experiencing a scenario where the number of running processes 
>>>> under mod_mono will ramp up quite fast from near zero to 60 or 70, 
>>>> then return to zero some time soon afterwards.
>>>>
>>>> We suspect that we have something locking the processes, causing this 
>>>> behaviour, but can't find anything.
>>>>
>>>> It would be extremely useful if mod_mono or xsp daemon could be 
>>>> queried in order to list the currently running process, by the 
>>>> external URL called to mod_mono.  Or maybe this can be done in the 
>>>> webservice c# code?
>>>>
>>>> Can any user suggest how this might be done?
>>> What you're describing is probably mod_mono starting up new 
>>> mod-mono-server instances when it finds that there's none running and 
>>> an incoming request needs to be processed. Only one mod-mono-server 
>>> handles all of the requests (unless it's configured otherwise), so you 
>>> shouldn't see the number of mod-mono-servers increase according to the 
>>> number of requests being processed. Except that mod_mono may start a 
>>> new mod-mono-server for each incoming request until it finds one running.
>>>
>>> I don't remember the details of how this works so I don't have 
>>> suggestions off hand, though.
>>>
>>> Josh
>>> _______________________________________________
>>> Mono-list maillist  -  Mono-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>>
>>
>>
>> *************************************************************************
>> This e-mail is confidential and may be legally privileged. It is intended
>> solely for the use of the individual(s) to whom it is addressed. Any
>> content in this message is not necessarily a view or statement from Road
>> Tech Computer Systems Limited but is that of the individual sender. If
>> you are not the intended recipient, be advised that you have received
>> this e-mail in error and that any use, dissemination, forwarding,
>> printing, or copying of this e-mail is strictly prohibited. We use
>> reasonable endeavours to virus scan all e-mails leaving the company but
>> no warranty is given that this e-mail and any attachments are virus free.
>> You should undertake your own virus checking. The right to monitor e-mail
>> communications through our networks is reserved by us
>>
>>  Road Tech Computer Systems Ltd. Shenley Hall, Rectory Lane, Shenley,
>>  Radlett, Hertfordshire, WD7 9AN. - VAT Registration No GB 449 3582 17
>>  Registered in England No: 02017435, Registered Address: Charter Court, 
>>  Midland Road, Hemel Hempstead,  Hertfordshire, HP2 5GE. 
>> *************************************************************************
>>
>> ------------------------------------------------------------------------
>>
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 


*************************************************************************
This e-mail is confidential and may be legally privileged. It is intended
solely for the use of the individual(s) to whom it is addressed. Any
content in this message is not necessarily a view or statement from Road
Tech Computer Systems Limited but is that of the individual sender. If
you are not the intended recipient, be advised that you have received
this e-mail in error and that any use, dissemination, forwarding,
printing, or copying of this e-mail is strictly prohibited. We use
reasonable endeavours to virus scan all e-mails leaving the company but
no warranty is given that this e-mail and any attachments are virus free.
You should undertake your own virus checking. The right to monitor e-mail
communications through our networks is reserved by us

  Road Tech Computer Systems Ltd. Shenley Hall, Rectory Lane, Shenley,
  Radlett, Hertfordshire, WD7 9AN. - VAT Registration No GB 449 3582 17
  Registered in England No: 02017435, Registered Address: Charter Court, 
  Midland Road, Hemel Hempstead,  Hertfordshire, HP2 5GE. 
*************************************************************************


More information about the Mono-list mailing list